determine pivot based on manifest

This commit is contained in:
2026-08-01 10:37:36 -07:00
parent 4aa3ed6ed8
commit 90da5934d7
2 changed files with 22 additions and 3 deletions
+14
View File
@@ -19,3 +19,17 @@ to_clip_corners :: proc(t: ^testing.T) {
testing.expect_value(t, p[0], f32(0))
testing.expect_value(t, p[1], f32(0))
}
@(test)
sprite_quad_origin_feet :: proc(t: ^testing.T) {
o := sprite_quad_origin({400, 500}, {100, 200}, {0.5, 1.0})
testing.expect_value(t, o.x, f32(350))
testing.expect_value(t, o.y, f32(300))
}
@(test)
sprite_quad_origin_center :: proc(t: ^testing.T) {
o := sprite_quad_origin({400, 500}, {100, 200}, {0.5, 0.5})
testing.expect_value(t, o.x, f32(350))
testing.expect_value(t, o.y, f32(400))
}