fix: precision loss, discard unused (#2541)

This commit is contained in:
veclavtalica
2022-06-24 13:59:31 +05:00
committed by GitHub
parent 3c3f08c416
commit 63568721f9
3 changed files with 9 additions and 12 deletions

View File

@@ -1051,7 +1051,7 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, f
{
// NOTE: Fixed line spacing of 1.5 line-height
// TODO: Support custom line spacing defined by user
textOffsetY += (int)((font.baseSize + font.baseSize/2)*scaleFactor);
textOffsetY += (int)((font.baseSize + font.baseSize/2.0f)*scaleFactor);
textOffsetX = 0.0f;
}
else
@@ -1123,7 +1123,7 @@ void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 pos
{
// NOTE: Fixed line spacing of 1.5 line-height
// TODO: Support custom line spacing defined by user
textOffsetY += (int)((font.baseSize + font.baseSize/2)*scaleFactor);
textOffsetY += (int)((font.baseSize + font.baseSize/2.0f)*scaleFactor);
textOffsetX = 0.0f;
}
else