Add some notes

This commit is contained in:
2025-11-17 01:20:57 +00:00
parent 8a2214f2fb
commit 15b3f9fb12
2 changed files with 21 additions and 2 deletions

View File

@@ -33,7 +33,7 @@
#define LINE_TOP (7 * HEIGHT / 16)
#define LINE_BOTTOM (9 * HEIGHT / 16)
std::pair<std::string, int> get_fraction_drawable(Fraction f)
std::pair<std::string, int> fraction_to_string(Fraction f)
{
std::string s{to_string(f)};
int width = MeasureText(s.c_str(), FONT_SIZE);
@@ -44,7 +44,7 @@ void draw_fraction(Fraction f, word_t x, word_t y)
{
std::string s;
int width;
std::tie(s, width) = get_fraction_drawable(f);
std::tie(s, width) = fraction_to_string(f);
// Centered at (x, y)
DrawText(s.c_str(), x - width / 2, y - FONT_SIZE, FONT_SIZE, WHITE);
}