MCPcopy Create free account
hub / github.com/cocos/cocos-engine / fromTranslation

Method fromTranslation

native/cocos/math/Mat3.cpp:321–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void Mat3::fromTranslation(const Vec2 &vec, Mat3 *out) {
322 CC_ASSERT(out);
323 out->m[0] = 1;
324 out->m[1] = 0;
325 out->m[2] = 0;
326 out->m[3] = 0;
327 out->m[4] = 1;
328 out->m[5] = 0;
329 out->m[6] = vec.x;
330 out->m[7] = vec.y;
331 out->m[8] = 1;
332}
333
334void Mat3::fromRotation(float rad, Mat3 *out) {
335 CC_ASSERT(out);

Callers 5

vec4.test.tsFile · 0.45
vec2.test.tsFile · 0.45
vec3.test.tsFile · 0.45
mat4.test.tsFile · 0.45
_getRectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected