How to use m21 method in wpt

Best JavaScript code snippet using wpt

Matrix3f.js

Source:Matrix3f.js Github

copy

Full Screen

1Clazz.declarePackage ("J.util");2Clazz.load (null, "J.util.Matrix3f", ["java.lang.ArrayIndexOutOfBoundsException", "J.util.Tuple3f"], function () {3c$ = Clazz.decorateAsClass (function () {4this.m00 = 0;5this.m01 = 0;6this.m02 = 0;7this.m10 = 0;8this.m11 = 0;9this.m12 = 0;10this.m20 = 0;11this.m21 = 0;12this.m22 = 0;13Clazz.instantialize (this, arguments);14}, J.util, "Matrix3f", null, java.io.Serializable);15Clazz.makeConstructor (c$, 16function () {17});18c$.newA = $_M(c$, "newA", 19function (v) {20var m = new J.util.Matrix3f ();21m.setA (v);22return m;23}, "~A");24c$.newM = $_M(c$, "newM", 25function (m1) {26var m = new J.util.Matrix3f ();27m.m00 = m1.m00;28m.m01 = m1.m01;29m.m02 = m1.m02;30m.m10 = m1.m10;31m.m11 = m1.m11;32m.m12 = m1.m12;33m.m20 = m1.m20;34m.m21 = m1.m21;35m.m22 = m1.m22;36return m;37}, "J.util.Matrix3f");38Clazz.overrideMethod (c$, "toString", 39function () {40return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "] ]";41});42$_M(c$, "setIdentity", 43function () {44this.m00 = 1.0;45this.m01 = 0.0;46this.m02 = 0.0;47this.m10 = 0.0;48this.m11 = 1.0;49this.m12 = 0.0;50this.m20 = 0.0;51this.m21 = 0.0;52this.m22 = 1.0;53});54$_M(c$, "setElement", 55function (row, column, value) {56if (row == 0) if (column == 0) this.m00 = value;57 else if (column == 1) this.m01 = value;58 else if (column == 2) this.m02 = value;59 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);60 else if (row == 1) if (column == 0) this.m10 = value;61 else if (column == 1) this.m11 = value;62 else if (column == 2) this.m12 = value;63 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);64 else if (row == 2) if (column == 0) this.m20 = value;65 else if (column == 1) this.m21 = value;66 else if (column == 2) this.m22 = value;67 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);68 else throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);69}, "~N,~N,~N");70$_M(c$, "getElement", 71function (row, column) {72if (row == 0) if (column == 0) return this.m00;73 else if (column == 1) return this.m01;74 else if (column == 2) return this.m02;75 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);76 else if (row == 1) if (column == 0) return this.m10;77 else if (column == 1) return this.m11;78 else if (column == 2) return this.m12;79 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);80 else if (row == 2) if (column == 0) return this.m20;81 else if (column == 1) return this.m21;82 else if (column == 2) return this.m22;83 else throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);84 else throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);85}, "~N,~N");86$_M(c$, "setRow", 87function (row, x, y, z) {88if (row == 0) {89this.m00 = x;90this.m01 = y;91this.m02 = z;92} else if (row == 1) {93this.m10 = x;94this.m11 = y;95this.m12 = z;96} else if (row == 2) {97this.m20 = x;98this.m21 = y;99this.m22 = z;100} else {101throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);102}}, "~N,~N,~N,~N");103$_M(c$, "setRowV", 104function (row, v) {105if (row == 0) {106this.m00 = v.x;107this.m01 = v.y;108this.m02 = v.z;109} else if (row == 1) {110this.m10 = v.x;111this.m11 = v.y;112this.m12 = v.z;113} else if (row == 2) {114this.m20 = v.x;115this.m21 = v.y;116this.m22 = v.z;117} else {118throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);119}}, "~N,J.util.Tuple3f");120$_M(c$, "getRow", 121function (row, v) {122if (row == 0) {123v[0] = this.m00;124v[1] = this.m01;125v[2] = this.m02;126} else if (row == 1) {127v[0] = this.m10;128v[1] = this.m11;129v[2] = this.m12;130} else if (row == 2) {131v[0] = this.m20;132v[1] = this.m21;133v[2] = this.m22;134} else {135throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);136}}, "~N,~A");137$_M(c$, "setRowA", 138function (row, v) {139if (row == 0) {140this.m00 = v[0];141this.m01 = v[1];142this.m02 = v[2];143} else if (row == 1) {144this.m10 = v[0];145this.m11 = v[1];146this.m12 = v[2];147} else if (row == 2) {148this.m20 = v[0];149this.m21 = v[1];150this.m22 = v[2];151} else {152throw new ArrayIndexOutOfBoundsException ("row must be 0 to 2 and is " + row);153}}, "~N,~A");154$_M(c$, "setColumn", 155function (column, x, y, z) {156if (column == 0) {157this.m00 = x;158this.m10 = y;159this.m20 = z;160} else if (column == 1) {161this.m01 = x;162this.m11 = y;163this.m21 = z;164} else if (column == 2) {165this.m02 = x;166this.m12 = y;167this.m22 = z;168} else {169throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);170}}, "~N,~N,~N,~N");171$_M(c$, "setColumnV", 172function (column, v) {173if (column == 0) {174this.m00 = v.x;175this.m10 = v.y;176this.m20 = v.z;177} else if (column == 1) {178this.m01 = v.x;179this.m11 = v.y;180this.m21 = v.z;181} else if (column == 2) {182this.m02 = v.x;183this.m12 = v.y;184this.m22 = v.z;185} else {186throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);187}}, "~N,J.util.V3");188$_M(c$, "setColumnA", 189function (column, v) {190if (column == 0) {191this.m00 = v[0];192this.m10 = v[1];193this.m20 = v[2];194} else if (column == 1) {195this.m01 = v[0];196this.m11 = v[1];197this.m21 = v[2];198} else if (column == 2) {199this.m02 = v[0];200this.m12 = v[1];201this.m22 = v[2];202} else {203throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);204}}, "~N,~A");205$_M(c$, "getColumnV", 206function (column, v) {207if (column == 0) {208v.x = this.m00;209v.y = this.m10;210v.z = this.m20;211} else if (column == 1) {212v.x = this.m01;213v.y = this.m11;214v.z = this.m21;215} else if (column == 2) {216v.x = this.m02;217v.y = this.m12;218v.z = this.m22;219} else {220throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);221}}, "~N,J.util.V3");222$_M(c$, "getColumn", 223function (column, v) {224if (column == 0) {225v[0] = this.m00;226v[1] = this.m10;227v[2] = this.m20;228} else if (column == 1) {229v[0] = this.m01;230v[1] = this.m11;231v[2] = this.m21;232} else if (column == 2) {233v[0] = this.m02;234v[1] = this.m12;235v[2] = this.m22;236} else {237throw new ArrayIndexOutOfBoundsException ("column must be 0 to 2 and is " + column);238}}, "~N,~A");239$_M(c$, "add", 240function (m1) {241this.m00 += m1.m00;242this.m01 += m1.m01;243this.m02 += m1.m02;244this.m10 += m1.m10;245this.m11 += m1.m11;246this.m12 += m1.m12;247this.m20 += m1.m20;248this.m21 += m1.m21;249this.m22 += m1.m22;250}, "J.util.Matrix3f");251$_M(c$, "sub", 252function (m1) {253this.m00 -= m1.m00;254this.m01 -= m1.m01;255this.m02 -= m1.m02;256this.m10 -= m1.m10;257this.m11 -= m1.m11;258this.m12 -= m1.m12;259this.m20 -= m1.m20;260this.m21 -= m1.m21;261this.m22 -= m1.m22;262}, "J.util.Matrix3f");263$_M(c$, "transpose", 264function () {265var tmp = this.m01;266this.m01 = this.m10;267this.m10 = tmp;268tmp = this.m02;269this.m02 = this.m20;270this.m20 = tmp;271tmp = this.m12;272this.m12 = this.m21;273this.m21 = tmp;274});275$_M(c$, "transposeM", 276function (m1) {277this.setM (m1);278this.transpose ();279}, "J.util.Matrix3f");280$_M(c$, "setAA", 281function (a1) {282this.setFromAxisAngle (a1.x, a1.y, a1.z, a1.angle);283}, "J.util.AxisAngle4f");284$_M(c$, "setFromAxisAngle", 285($fz = function (x, y, z, angle) {286var n = Math.sqrt (x * x + y * y + z * z);287n = 1 / n;288x *= n;289y *= n;290z *= n;291var c = Math.cos (angle);292var s = Math.sin (angle);293var omc = 1.0 - c;294this.m00 = (c + x * x * omc);295this.m11 = (c + y * y * omc);296this.m22 = (c + z * z * omc);297var tmp1 = x * y * omc;298var tmp2 = z * s;299this.m01 = (tmp1 - tmp2);300this.m10 = (tmp1 + tmp2);301tmp1 = x * z * omc;302tmp2 = y * s;303this.m02 = (tmp1 + tmp2);304this.m20 = (tmp1 - tmp2);305tmp1 = y * z * omc;306tmp2 = x * s;307this.m12 = (tmp1 - tmp2);308this.m21 = (tmp1 + tmp2);309}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N");310$_M(c$, "setM", 311function (m1) {312this.m00 = m1.m00;313this.m01 = m1.m01;314this.m02 = m1.m02;315this.m10 = m1.m10;316this.m11 = m1.m11;317this.m12 = m1.m12;318this.m20 = m1.m20;319this.m21 = m1.m21;320this.m22 = m1.m22;321}, "J.util.Matrix3f");322$_M(c$, "setA", 323function (m) {324this.m00 = m[0];325this.m01 = m[1];326this.m02 = m[2];327this.m10 = m[3];328this.m11 = m[4];329this.m12 = m[5];330this.m20 = m[6];331this.m21 = m[7];332this.m22 = m[8];333}, "~A");334$_M(c$, "invertM", 335function (m1) {336this.setM (m1);337this.invert ();338}, "J.util.Matrix3f");339$_M(c$, "invert", 340function () {341var s = this.determinant ();342if (s == 0.0) return;343s = 1 / s;344this.set (this.m11 * this.m22 - this.m12 * this.m21, this.m02 * this.m21 - this.m01 * this.m22, this.m01 * this.m12 - this.m02 * this.m11, this.m12 * this.m20 - this.m10 * this.m22, this.m00 * this.m22 - this.m02 * this.m20, this.m02 * this.m10 - this.m00 * this.m12, this.m10 * this.m21 - this.m11 * this.m20, this.m01 * this.m20 - this.m00 * this.m21, this.m00 * this.m11 - this.m01 * this.m10);345this.mulf (s);346});347$_M(c$, "determinant", 348function () {349return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11);350});351$_M(c$, "setScale", 352function (scale) {353this.m00 = scale;354this.m01 = 0.0;355this.m02 = 0.0;356this.m10 = 0.0;357this.m11 = scale;358this.m12 = 0.0;359this.m20 = 0.0;360this.m21 = 0.0;361this.m22 = scale;362}, "~N");363$_M(c$, "rotX", 364function (angle) {365var c = Math.cos (angle);366var s = Math.sin (angle);367this.m00 = 1.0;368this.m01 = 0.0;369this.m02 = 0.0;370this.m10 = 0.0;371this.m11 = c;372this.m12 = -s;373this.m20 = 0.0;374this.m21 = s;375this.m22 = c;376}, "~N");377$_M(c$, "rotY", 378function (angle) {379var c = Math.cos (angle);380var s = Math.sin (angle);381this.m00 = c;382this.m01 = 0.0;383this.m02 = s;384this.m10 = 0.0;385this.m11 = 1.0;386this.m12 = 0.0;387this.m20 = -s;388this.m21 = 0.0;389this.m22 = c;390}, "~N");391$_M(c$, "rotZ", 392function (angle) {393var c = Math.cos (angle);394var s = Math.sin (angle);395this.m00 = c;396this.m01 = -s;397this.m02 = 0.0;398this.m10 = s;399this.m11 = c;400this.m12 = 0.0;401this.m20 = 0.0;402this.m21 = 0.0;403this.m22 = 1.0;404}, "~N");405$_M(c$, "mulf", 406function (scalar) {407this.m00 *= scalar;408this.m01 *= scalar;409this.m02 *= scalar;410this.m10 *= scalar;411this.m11 *= scalar;412this.m12 *= scalar;413this.m20 *= scalar;414this.m21 *= scalar;415this.m22 *= scalar;416}, "~N");417$_M(c$, "mul", 418function (m1) {419this.mul2 (this, m1);420}, "J.util.Matrix3f");421$_M(c$, "mul2", 422function (m1, m2) {423this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22);424}, "J.util.Matrix3f,J.util.Matrix3f");425Clazz.overrideMethod (c$, "equals", 426function (o) {427if (!(Clazz.instanceOf (o, J.util.Matrix3f))) return false;428var m = o;429return this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22;430}, "~O");431Clazz.overrideMethod (c$, "hashCode", 432function () {433return J.util.Tuple3f.floatToIntBits0 (this.m00) ^ J.util.Tuple3f.floatToIntBits0 (this.m01) ^ J.util.Tuple3f.floatToIntBits0 (this.m02) ^ J.util.Tuple3f.floatToIntBits0 (this.m10) ^ J.util.Tuple3f.floatToIntBits0 (this.m11) ^ J.util.Tuple3f.floatToIntBits0 (this.m12) ^ J.util.Tuple3f.floatToIntBits0 (this.m20) ^ J.util.Tuple3f.floatToIntBits0 (this.m21) ^ J.util.Tuple3f.floatToIntBits0 (this.m22);434});435$_M(c$, "setZero", 436function () {437this.m00 = 0.0;438this.m01 = 0.0;439this.m02 = 0.0;440this.m10 = 0.0;441this.m11 = 0.0;442this.m12 = 0.0;443this.m20 = 0.0;444this.m21 = 0.0;445this.m22 = 0.0;446});447$_M(c$, "transform", 448function (t) {449this.transform2 (t, t);450}, "J.util.Tuple3f");451$_M(c$, "transform2", 452function (t, result) {453result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z);454}, "J.util.Tuple3f,J.util.Tuple3f");455$_M(c$, "set", 456($fz = function (m00, m01, m02, m10, m11, m12, m20, m21, m22) {457this.m00 = m00;458this.m01 = m01;459this.m02 = m02;460this.m10 = m10;461this.m11 = m11;462this.m12 = m12;463this.m20 = m20;464this.m21 = m21;465this.m22 = m22;466}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N"); ...

Full Screen

Full Screen

M34.js

Source:M34.js Github

copy

Full Screen

1Clazz.declarePackage ("JU");2Clazz.load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {3c$ = Clazz.decorateAsClass (function () {4this.m00 = 0;5this.m01 = 0;6this.m02 = 0;7this.m10 = 0;8this.m11 = 0;9this.m12 = 0;10this.m20 = 0;11this.m21 = 0;12this.m22 = 0;13Clazz.instantialize (this, arguments);14}, JU, "M34");15Clazz.defineMethod (c$, "setAA33", 16function (a) {17var x = a.x;18var y = a.y;19var z = a.z;20var angle = a.angle;21var n = Math.sqrt (x * x + y * y + z * z);22n = 1 / n;23x *= n;24y *= n;25z *= n;26var c = Math.cos (angle);27var s = Math.sin (angle);28var omc = 1.0 - c;29this.m00 = (c + x * x * omc);30this.m11 = (c + y * y * omc);31this.m22 = (c + z * z * omc);32var tmp1 = x * y * omc;33var tmp2 = z * s;34this.m01 = (tmp1 - tmp2);35this.m10 = (tmp1 + tmp2);36tmp1 = x * z * omc;37tmp2 = y * s;38this.m02 = (tmp1 + tmp2);39this.m20 = (tmp1 - tmp2);40tmp1 = y * z * omc;41tmp2 = x * s;42this.m12 = (tmp1 - tmp2);43this.m21 = (tmp1 + tmp2);44}, "JU.A4");45Clazz.defineMethod (c$, "rotate", 46function (t) {47this.rotate2 (t, t);48}, "JU.T3");49Clazz.defineMethod (c$, "rotate2", 50function (t, result) {51result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z);52}, "JU.T3,JU.T3");53Clazz.defineMethod (c$, "setM33", 54function (m1) {55this.m00 = m1.m00;56this.m01 = m1.m01;57this.m02 = m1.m02;58this.m10 = m1.m10;59this.m11 = m1.m11;60this.m12 = m1.m12;61this.m20 = m1.m20;62this.m21 = m1.m21;63this.m22 = m1.m22;64}, "JU.M34");65Clazz.defineMethod (c$, "clear33", 66function () {67this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;68});69Clazz.defineMethod (c$, "set33", 70function (row, col, v) {71switch (row) {72case 0:73switch (col) {74case 0:75this.m00 = v;76return;77case 1:78this.m01 = v;79return;80case 2:81this.m02 = v;82return;83}84break;85case 1:86switch (col) {87case 0:88this.m10 = v;89return;90case 1:91this.m11 = v;92return;93case 2:94this.m12 = v;95return;96}97break;98case 2:99switch (col) {100case 0:101this.m20 = v;102return;103case 1:104this.m21 = v;105return;106case 2:107this.m22 = v;108return;109}110break;111}112this.err ();113}, "~N,~N,~N");114Clazz.defineMethod (c$, "get33", 115function (row, col) {116switch (row) {117case 0:118switch (col) {119case 0:120return this.m00;121case 1:122return this.m01;123case 2:124return this.m02;125}126break;127case 1:128switch (col) {129case 0:130return this.m10;131case 1:132return this.m11;133case 2:134return this.m12;135}136break;137case 2:138switch (col) {139case 0:140return this.m20;141case 1:142return this.m21;143case 2:144return this.m22;145}146break;147}148this.err ();149return 0;150}, "~N,~N");151Clazz.defineMethod (c$, "setRow33", 152function (row, v) {153switch (row) {154case 0:155this.m00 = v[0];156this.m01 = v[1];157this.m02 = v[2];158return;159case 1:160this.m10 = v[0];161this.m11 = v[1];162this.m12 = v[2];163return;164case 2:165this.m20 = v[0];166this.m21 = v[1];167this.m22 = v[2];168return;169default:170this.err ();171}172}, "~N,~A");173Clazz.defineMethod (c$, "getRow33", 174function (row, v) {175switch (row) {176case 0:177v[0] = this.m00;178v[1] = this.m01;179v[2] = this.m02;180return;181case 1:182v[0] = this.m10;183v[1] = this.m11;184v[2] = this.m12;185return;186case 2:187v[0] = this.m20;188v[1] = this.m21;189v[2] = this.m22;190return;191}192this.err ();193}, "~N,~A");194Clazz.defineMethod (c$, "setColumn33", 195function (column, v) {196switch (column) {197case 0:198this.m00 = v[0];199this.m10 = v[1];200this.m20 = v[2];201break;202case 1:203this.m01 = v[0];204this.m11 = v[1];205this.m21 = v[2];206break;207case 2:208this.m02 = v[0];209this.m12 = v[1];210this.m22 = v[2];211break;212default:213this.err ();214}215}, "~N,~A");216Clazz.defineMethod (c$, "getColumn33", 217function (column, v) {218switch (column) {219case 0:220v[0] = this.m00;221v[1] = this.m10;222v[2] = this.m20;223break;224case 1:225v[0] = this.m01;226v[1] = this.m11;227v[2] = this.m21;228break;229case 2:230v[0] = this.m02;231v[1] = this.m12;232v[2] = this.m22;233break;234default:235this.err ();236}237}, "~N,~A");238Clazz.defineMethod (c$, "add33", 239function (m1) {240this.m00 += m1.m00;241this.m01 += m1.m01;242this.m02 += m1.m02;243this.m10 += m1.m10;244this.m11 += m1.m11;245this.m12 += m1.m12;246this.m20 += m1.m20;247this.m21 += m1.m21;248this.m22 += m1.m22;249}, "JU.M34");250Clazz.defineMethod (c$, "sub33", 251function (m1) {252this.m00 -= m1.m00;253this.m01 -= m1.m01;254this.m02 -= m1.m02;255this.m10 -= m1.m10;256this.m11 -= m1.m11;257this.m12 -= m1.m12;258this.m20 -= m1.m20;259this.m21 -= m1.m21;260this.m22 -= m1.m22;261}, "JU.M34");262Clazz.defineMethod (c$, "mul33", 263function (x) {264this.m00 *= x;265this.m01 *= x;266this.m02 *= x;267this.m10 *= x;268this.m11 *= x;269this.m12 *= x;270this.m20 *= x;271this.m21 *= x;272this.m22 *= x;273}, "~N");274Clazz.defineMethod (c$, "transpose33", 275function () {276var tmp = this.m01;277this.m01 = this.m10;278this.m10 = tmp;279tmp = this.m02;280this.m02 = this.m20;281this.m20 = tmp;282tmp = this.m12;283this.m12 = this.m21;284this.m21 = tmp;285});286Clazz.defineMethod (c$, "setXRot", 287function (angle) {288var c = Math.cos (angle);289var s = Math.sin (angle);290this.m00 = 1.0;291this.m01 = 0.0;292this.m02 = 0.0;293this.m10 = 0.0;294this.m11 = c;295this.m12 = -s;296this.m20 = 0.0;297this.m21 = s;298this.m22 = c;299}, "~N");300Clazz.defineMethod (c$, "setYRot", 301function (angle) {302var c = Math.cos (angle);303var s = Math.sin (angle);304this.m00 = c;305this.m01 = 0.0;306this.m02 = s;307this.m10 = 0.0;308this.m11 = 1.0;309this.m12 = 0.0;310this.m20 = -s;311this.m21 = 0.0;312this.m22 = c;313}, "~N");314Clazz.defineMethod (c$, "setZRot", 315function (angle) {316var c = Math.cos (angle);317var s = Math.sin (angle);318this.m00 = c;319this.m01 = -s;320this.m02 = 0.0;321this.m10 = s;322this.m11 = c;323this.m12 = 0.0;324this.m20 = 0.0;325this.m21 = 0.0;326this.m22 = 1.0;327}, "~N");328Clazz.defineMethod (c$, "determinant3", 329function () {330return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11);331});332Clazz.defineMethod (c$, "err", 333function () {334throw new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");335}); ...

Full Screen

Full Screen

Transform2D.js

Source:Transform2D.js Github

copy

Full Screen

1Elm.Native.Transform2D = {};2Elm.Native.Transform2D.make = function(localRuntime) {3 localRuntime.Native = localRuntime.Native || {};4 localRuntime.Native.Transform2D = localRuntime.Native.Transform2D || {};5 if (localRuntime.Native.Transform2D.values)6 {7 return localRuntime.Native.Transform2D.values;8 }9 var A;10 if (typeof Float32Array === 'undefined')11 {12 A = function(arr)13 {14 this.length = arr.length;15 this[0] = arr[0];16 this[1] = arr[1];17 this[2] = arr[2];18 this[3] = arr[3];19 this[4] = arr[4];20 this[5] = arr[5];21 };22 }23 else24 {25 A = Float32Array;26 }27 // layout of matrix in an array is28 //29 // | m11 m12 dx |30 // | m21 m22 dy |31 // | 0 0 1 |32 //33 // new A([ m11, m12, dx, m21, m22, dy ])34 var identity = new A([1, 0, 0, 0, 1, 0]);35 function matrix(m11, m12, m21, m22, dx, dy)36 {37 return new A([m11, m12, dx, m21, m22, dy]);38 }39 function rotation(t)40 {41 var c = Math.cos(t);42 var s = Math.sin(t);43 return new A([c, -s, 0, s, c, 0]);44 }45 function rotate(t, m)46 {47 var c = Math.cos(t);48 var s = Math.sin(t);49 var m11 = m[0], m12 = m[1], m21 = m[3], m22 = m[4];50 return new A([m11 * c + m12 * s, -m11 * s + m12 * c, m[2],51 m21 * c + m22 * s, -m21 * s + m22 * c, m[5]]);52 }53 /*54 function move(xy,m) {55 var x = xy._0;56 var y = xy._1;57 var m11 = m[0], m12 = m[1], m21 = m[3], m22 = m[4];58 return new A([m11, m12, m11*x + m12*y + m[2],59 m21, m22, m21*x + m22*y + m[5]]);60 }61 function scale(s,m) { return new A([m[0]*s, m[1]*s, m[2], m[3]*s, m[4]*s, m[5]]); }62 function scaleX(x,m) { return new A([m[0]*x, m[1], m[2], m[3]*x, m[4], m[5]]); }63 function scaleY(y,m) { return new A([m[0], m[1]*y, m[2], m[3], m[4]*y, m[5]]); }64 function reflectX(m) { return new A([-m[0], m[1], m[2], -m[3], m[4], m[5]]); }65 function reflectY(m) { return new A([m[0], -m[1], m[2], m[3], -m[4], m[5]]); }66 function transform(m11, m21, m12, m22, mdx, mdy, n) {67 var n11 = n[0], n12 = n[1], n21 = n[3], n22 = n[4], ndx = n[2], ndy = n[5];68 return new A([m11*n11 + m12*n21,69 m11*n12 + m12*n22,70 m11*ndx + m12*ndy + mdx,71 m21*n11 + m22*n21,72 m21*n12 + m22*n22,73 m21*ndx + m22*ndy + mdy]);74 }75 */76 function multiply(m, n)77 {78 var m11 = m[0], m12 = m[1], m21 = m[3], m22 = m[4], mdx = m[2], mdy = m[5];79 var n11 = n[0], n12 = n[1], n21 = n[3], n22 = n[4], ndx = n[2], ndy = n[5];80 return new A([m11 * n11 + m12 * n21,81 m11 * n12 + m12 * n22,82 m11 * ndx + m12 * ndy + mdx,83 m21 * n11 + m22 * n21,84 m21 * n12 + m22 * n22,85 m21 * ndx + m22 * ndy + mdy]);86 }87 return localRuntime.Native.Transform2D.values = {88 identity: identity,89 matrix: F6(matrix),90 rotation: rotation,91 multiply: F2(multiply)92 /*93 transform: F7(transform),94 rotate: F2(rotate),95 move: F2(move),96 scale: F2(scale),97 scaleX: F2(scaleX),98 scaleY: F2(scaleY),99 reflectX: reflectX,100 reflectY: reflectY101 */102 };...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2 if (err) {3 console.log(err);4 } else {5 console.log(data);6 }7});8var wpt = require('wpt');9 if (err) {10 console.log(err);11 } else {12 console.log(data);13 }14});15var wpt = require('wpt');16 if (err) {17 console.log(err);18 } else {19 console.log(data);20 }21});22var wpt = require('wpt');23 if (err) {24 console.log(err);25 } else {26 console.log(data);27 }28});29var wpt = require('wpt');30 if (err) {31 console.log(err);32 } else {33 console.log(data);34 }35});36var wpt = require('wpt');37 if (err) {38 console.log(err);39 } else {40 console.log(data);41 }42});43var wpt = require('wpt');44 if (err) {45 console.log(err);46 } else {47 console.log(data);48 }49});50var wpt = require('wpt');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var params = {3};4wpt.runTest(params, function(err, data) {5 if (err) {6 console.log(err);7 } else {8 console.log(data);9 }10});11var wpt = require('wpt');12var params = {13};14wpt.runTest(params, function(err, data) {15 if (err) {16 console.log(err);17 } else {18 console.log(data);19 }20});21var wpt = require('wpt');22var params = {23};24wpt.runTest(params, function(err, data) {25 if (err) {26 console.log(err);27 } else {28 console.log(data);29 }30});31var wpt = require('wpt');32var params = {33};34wpt.runTest(params, function(err, data) {35 if (err) {36 console.log(err);37 } else {38 console.log(data);39 }40});41var wpt = require('wpt');42var params = {43};44wpt.runTest(params, function(err, data) {45 if (err) {46 console.log(err);47 } else {48 console.log(data);49 }50});

Full Screen

Using AI Code Generation

copy

Full Screen

1var m21 = require('m21');2var wpt = new m21.WPT();3 console.log(data);4});5var m21 = require('m21');6var wpt = new m21.WPT();7 console.log(data);8});9var m21 = require('m21');10var wpt = new m21.WPT();11 console.log(data);12});13var m21 = require('m21');14var wpt = new m21.WPT();15 console.log(data);16});17var m21 = require('m21');18var wpt = new m21.WPT();19 console.log(data);20});21var m21 = require('m21');22var wpt = new m21.WPT();23 console.log(data);24});25var m21 = require('m21');26var wpt = new m21.WPT();27 console.log(data);28});29var m21 = require('m21');30var wpt = new m21.WPT();31 console.log(data);32});33var m21 = require('m21');34var wpt = new m21.WPT();

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var m21 = require('m21');3var wpt = new wpt();4var m21 = new m21();5wpt.m21();6exports.m21 = function() {7 m21.m21();8};9exports.m21 = function() {10};

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful