determine pivot based on manifest
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user