mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 20:46:17 +00:00
append a 0 when fractional part is less than 10
This commit is contained in:
parent
b1c9a9dc3c
commit
879d04a583
6
clay.h
6
clay.h
|
@ -3615,7 +3615,11 @@ void Clay__RenderDebugView(void) {
|
||||||
CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig);
|
CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig);
|
||||||
CLAY_TEXT(CLAY_STRING("."), infoTextConfig);
|
CLAY_TEXT(CLAY_STRING("."), infoTextConfig);
|
||||||
float frac = aspectRatioConfig->aspectRatio - (int)(aspectRatioConfig->aspectRatio);
|
float frac = aspectRatioConfig->aspectRatio - (int)(aspectRatioConfig->aspectRatio);
|
||||||
CLAY_TEXT(Clay__IntToString(frac * 100), infoTextConfig);
|
frac *= 100;
|
||||||
|
if ((int)frac < 10) {
|
||||||
|
CLAY_TEXT(CLAY_STRING("0"), infoTextConfig);
|
||||||
|
}
|
||||||
|
CLAY_TEXT(Clay__IntToString(frac), infoTextConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue