reorganization of twn_util.h, reletion of some seldom used procedures

This commit is contained in:
veclavtalica
2025-02-20 13:48:44 +03:00
parent 723ccf1126
commit f044a75ffe
4 changed files with 13 additions and 86 deletions

View File

@ -216,7 +216,7 @@ void render_sprite_batch(const Primitive2D primitives[],
#pragma GCC diagnostic pop
const Vec2 c = rect_center(sprite.rect);
const Vec2 c = { sprite.rect.x + sprite.rect.w / 2, sprite.rect.y + sprite.rect.h / 2 };
const Vec2 t = fast_cossine(sprite.rotation + (float)M_PI_4);
const Vec2 d = {
.x = t.x * sprite.rect.w * (float)M_SQRT1_2,
@ -231,7 +231,7 @@ void render_sprite_batch(const Primitive2D primitives[],
} else {
/* rotated non-square case*/
const Vec2 c = rect_center(sprite.rect);
const Vec2 c = { sprite.rect.x + sprite.rect.w / 2, sprite.rect.y + sprite.rect.h / 2 };
const Vec2 t = fast_cossine(sprite.rotation);
const Vec2 h = { sprite.rect.w / 2, sprite.rect.h / 2 };