chore(meta): Cleanup

This commit is contained in:
Stuart Carnie 2018-11-06 07:55:43 -07:00
parent b59f05500e
commit fd2524429d
No known key found for this signature in database
GPG Key ID: 848D9C9718D78B4F

View File

@ -86,20 +86,16 @@
_frame = frame; _frame = frame;
// update vertices float l = (float)CGRectGetMinX(frame);
CGPoint o = frame.origin; float t = (float)CGRectGetMinY(frame);
CGSize s = frame.size; float r = (float)CGRectGetMaxX(frame);
float b = (float)CGRectGetMaxY(frame);
float l = o.x;
float t = o.y;
float r = o.x + s.width;
float b = o.y + s.height;
Vertex v[4] = { Vertex v[4] = {
{{l, b, 0}, {0, 1}}, {simd_make_float3(l, b, 0), simd_make_float2(0, 1)},
{{r, b, 0}, {1, 1}}, {simd_make_float3(r, b, 0), simd_make_float2(1, 1)},
{{l, t, 0}, {0, 0}}, {simd_make_float3(l, t, 0), simd_make_float2(0, 0)},
{{r, t, 0}, {1, 0}}, {simd_make_float3(r, t, 0), simd_make_float2(1, 0)},
}; };
memcpy(_v, v, sizeof(_v)); memcpy(_v, v, sizeof(_v));
} }