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;
// update vertices
CGPoint o = frame.origin;
CGSize s = frame.size;
float l = o.x;
float t = o.y;
float r = o.x + s.width;
float b = o.y + s.height;
float l = (float)CGRectGetMinX(frame);
float t = (float)CGRectGetMinY(frame);
float r = (float)CGRectGetMaxX(frame);
float b = (float)CGRectGetMaxY(frame);
Vertex v[4] = {
{{l, b, 0}, {0, 1}},
{{r, b, 0}, {1, 1}},
{{l, t, 0}, {0, 0}},
{{r, t, 0}, {1, 0}},
{simd_make_float3(l, b, 0), simd_make_float2(0, 1)},
{simd_make_float3(r, b, 0), simd_make_float2(1, 1)},
{simd_make_float3(l, t, 0), simd_make_float2(0, 0)},
{simd_make_float3(r, t, 0), simd_make_float2(1, 0)},
};
memcpy(_v, v, sizeof(_v));
}