function wNewRotateXY (a, t) {
let c = cos (t), s = sin (t);
let ax = a[0], ay = a[1];
return [c * ax - s * ay,
s * ax + c * ay,
a[2]];
}
function wRotateYZ (a, t) {
let c = cos (t), s = sin (t);
let ay = a[1], az = a[2];
a[1] = c * ay - s * az;
a[2] = s * ay + c * az;
return a;
}
function wLetRotateYZ (o, a, t) {
let c = cos (t), s = sin (t);
let ay = a[1], az = a[2];
o[0] = a[0];
o[1] = c * ay - s * az;
o[2] = s * ay + c * az;
return o;
}
function wNewRotateYZ (a, t) {
let c = cos (t), s = sin (t);
let ay = a[1], az = a[2];
return [a[0],
c * ay - s * az,
s * ay + c * az];
}
function wRotateZX (a, t) {
let c = cos (t), s = sin (t);
let ax = a[0], az = a[2];
a[0] = s * az + c * ax;
a[2] = c * az - s * ax;
return a;
}
function wLetRotateZX (o, a, t) {
let c = cos (t), s = sin (t);
let ax = a[0], az = a[2];
o[0] = s * az + c * ax;
o[1] = a[1];
o[2] = c * az - s * ax;
return o;
}
function wNewRotateZX (a, t) {
let c = cos (t), s = sin (t);
let ax = a[0], az = a[2];
return [s * az + c * ax,
a[1],
c * az - s * ax];
}
function wLetScalarX (o, s) {
o[0] = s;
o[1] = 0;
o[2] = 0;
return o;
}
function wNewScalarX (s) {
return [s,
0,
0];
}
function wLetScalarY (o, s) {
o[0] = 0;
o[1] = s;
o[2] = 0;
return o;
}
function wNewScalarY (s) {
return [0,
s,
0];
}
function wLetScalarZ (o, s) {
o[0] = 0;
o[1] = 0;
o[2] = s;
return o;
}
function wNewScalarZ (s) {
return [0,
0,
s];
}
function wScaleS (a, s) {
a[0] *= s;
a[1] *= s;
a[2] *= s;
return a;
}
function wLetScaleS (o, a, s) {
o[0] = a[0] * s;
o[1] = a[1] * s;
o[2] = a[2] * s;
return o;
}
function wNewScaleS (a, s) {
return [a[0] * s,
a[1] * s,
a[2] * s];
}
function wScaleW (a, w) {
a[0] *= w[0];
a[1] *= w[1];
a[2] *= w[2];
return a;
}
function wLetScaleW (o, a, w) {
o[0] = a[0] * w[0];
o[1] = a[1] * w[1];
o[2] = a[2] * w[2];
return o;
}
function wNewScaleW (a, w) {
return [a[0] * w[0],
a[1] * w[1],
a[2] * w[2]];
}
function wScaleX (a, p) {
a[0] *= p;
return a;
}
function wLetScaleX (o, a, p) {
o[0] = a[0] * p;
o[1] = a[1];
o[2] = a[2];
return o;
}
function wNewScaleX (a, p) {
return [a[0] * p,
a[1],
a[2]];
}
function wScaleY (a, q) {
a[1] *= q;
return a;
}
function wLetScaleY (o, a, q) {
o[0] = a[0];
o[1] = a[1] * q;
o[2] = a[2];
return o;
}
function wNewScaleY (a, q) {
return [a[0],
a[1] * q,
a[2]];
}
function wScaleZ (a, r) {
a[2] *= r;
return a;
}
function wLetScaleZ (o, a, r) {
o[0] = a[0];
o[1] = a[1];
o[2] = a[2] * r;
return o;
}
function wNewScaleZ (a, r) {
return [a[0],
a[1],
a[2] * r];
}
function wScaleXYZ (a, p, q, r) {
a[0] *= p;
a[1] *= q;
a[2] *= r;
return a;
}
function wLetScaleXYZ (o, a, p, q, r) {
o[0] = a[0] * p;
o[1] = a[1] * q;
o[2] = a[2] * r;
return o;
}
function wNewScaleXYZ (a, p, q, r) {
return [a[0] * p,
a[1] * q,
a[2] * r];
}
function wStretch (a, s, t) {
let ax = a[0], ay = a[1], az = a[2];
s += t / hypot3 (ax, ay, az);
a[0] = ax * s;
a[1] = ay * s;
a[2] = az * s;
return a;
}
function wLetStretch (o, a, s, t) {
let ax = a[0], ay = a[1], az = a[2];
s += t / hypot3 (ax, ay, az);
o[0] = ax * s;
o[1] = ay * s;
o[2] = az * s;
return o;
}
function wNewStretch (a, s, t) {
let ax = a[0], ay = a[1], az = a[2];
s += t / hypot3 (ax, ay, az);
return [ax * s,
ay * s,
az * s];
}
function wStretchFrom (a, s, t, b) {
let ax = a[0], ay = a[1], az = a[2];
let bx = b[0], by = b[1], bz = b[2];
ax -= bx;
ay -= by;
az -= bz;
s += t / hypot3 (ax, ay, az);
a[0] = ax * s + bx;
a[1] = ay * s + by;
a[2] = az * s + bz;
return a;
}
function wLetStretchFrom (o, a, s, t, b) {
let ax = a[0], ay = a[1], az = a[2];
let bx = b[0], by = b[1], bz = b[2];
ax -= bx;
ay -= by;
az -= bz;
s += t / hypot3 (ax, ay, az);
o[0] = ax * s + bx;
o[1] = ay * s + by;
o[2] = az * s + bz;
return o;
}
function wNewStretchFrom (a, s, t, b) {
let ax = a[0], ay = a[1], az = a[2];
let bx = b[0], by = b[1], bz = b[2];
ax -= bx;
ay -= by;
az -= bz;
s += t / hypot3 (ax, ay, az);
return [ax * s + bx,
ay * s + by,
az * s + bz];
}
function wSubtractW (a, b) {
a[0] -= b[0];
a[1] -= b[1];
a[2] -= b[2];
return a;
}
function wLetSubtractW (o, a, b) {
o[0] = a[0] - b[0];
o[1] = a[1] - b[1];
o[2] = a[2] - b[2];
return o;
}
function wNewSubtractW (a, b) {
return [a[0] - b[0],
a[1] - b[1],
a[2] - b[2]];
}
function wSubtractX (a, d) {
a[0] -= d;
return a;
}
function wLetSubtractX (o, a, d) {
o[0] = a[0] - d;
o[1] = a[1];
o[2] = a[2];
return o;
}
function wNewSubtractX (a, d) {
return [a[0] - d,
a[1],
a[2]];
}
function wSubtractY (a, e) {
a[1] -= e;
return a;
}
function wLetSubtractY (o, a, e) {
o[0] = a[0];
o[1] = a[1] - e;
o[2] = a[2];
return o;
}
function wNewSubtractY (a, e) {
return [a[0],
a[1] - e,
a[2]];
}
function wSubtractZ (a, f) {
a[2] -= f;
return a;
}
function wLetSubtractZ (o, a, f) {
o[0] = a[0];
o[1] = a[1];
o[2] = a[2] - f;
return o;
}
function wNewSubtractZ (a, f) {
return [a[0],
a[1],
a[2] - f];
}
function wSubtractXYZ (a, d, e, f) {
a[0] -= d;
a[1] -= e;
a[2] -= f;
return a;
}
function wLetSubtractXYZ (o, a, d, e, f) {
o[0] = a[0] - d;
o[1] = a[1] - e;
o[2] = a[2] - f;
return o;
}
function wNewSubtractXYZ (a, d, e, f) {
return [a[0] - d,
a[1] - e,
a[2] - f];
}
function wTransform (a, n) {
let ax = a[0], ay = a[1], az = a[2];
a[0] = n[0] * ax + n[1] * ay + n[ 2] * az + n[ 3];
a[1] = n[4] * ax + n[5] * ay + n[ 6] * az + n[ 7];
a[2] = n[8] * ax + n[9] * ay + n[10] * az + n[11];
return a;
}
function wLetTransform (o, a, n) {
let ax = a[0], ay = a[1], az = a[2];
o[0] = n[0] * ax + n[1] * ay + n[ 2] * az + n[ 3];
o[1] = n[4] * ax + n[5] * ay + n[ 6] * az + n[ 7];
o[2] = n[8] * ax + n[9] * ay + n[10] * az + n[11];
return o;
}
function wNewTransform (a, n) {
let ax = a[0], ay = a[1], az = a[2];
return [n[0] * ax + n[1] * ay + n[ 2] * az + n[ 3],
n[4] * ax + n[5] * ay + n[ 6] * az + n[ 7],
n[8] * ax + n[9] * ay + n[10] * az + n[11]];
}
function wTranslateW (a, b) {
a[0] += b[0];
a[1] += b[1];
a[2] += b[2];
return a;
}
function wLetTranslateW (o, a, b) {
o[0] = a[0] + b[0];
o[1] = a[1] + b[1];
o[2] = a[2] + b[2];
return o;
}
function wNewTranslateW (a, b) {
return [a[0] + b[0],
a[1] + b[1],
a[2] + b[2]];
}
function wTranslateX (a, d) {
a[0] += d;
return a;
}
function wLetTranslateX (o, a, d) {
o[0] = a[0] + d;
o[1] = a[1];
o[2] = a[2];
return o;
}
function wNewTranslateX (a, d) {
return [a[0] + d,
a[1],
a[2]];
}
function wTranslateY (a, e) {
a[1] += e;
return a;
}
function wLetTranslateY (o, a, e) {
o[0] = a[0];
o[1] = a[1] + e;
o[2] = a[2];
return o;
}
function wNewTranslateY (a, e) {
return [a[0],
a[1] + e,
a[2]];
}
function wTranslateZ (a, f) {
a[2] += f;
return a;
}
function wLetTranslateZ (o, a, f) {
o[0] = a[0];
o[1] = a[1];
o[2] = a[2] + f;
return o;
}
function wNewTranslateZ (a, f) {
return [a[0],
a[1],
a[2] + f];
}
function wTranslateXYZ (a, d, e, f) {
a[0] += d;
a[1] += e;
a[2] += f;
return a;
}
function wLetTranslateXYZ (o, a, d, e, f) {
o[0] = a[0] + d;
o[1] = a[1] + e;
o[2] = a[2] + f;
return o;
}
function wNewTranslateXYZ (a, d, e, f) {
return [a[0] + d,
a[1] + e,
a[2] + f];
}
function wTrisect (a, b) {
a[0] = TWO_3 * a[0] + ONE_3 * b[0];
a[1] = TWO_3 * a[1] + ONE_3 * b[1];
a[2] = TWO_3 * a[2] + ONE_3 * b[2];
return a;
}
function wLetTrisect (o, a, b) {
o[0] = TWO_3 * a[0] + ONE_3 * b[0];
o[1] = TWO_3 * a[1] + ONE_3 * b[1];
o[2] = TWO_3 * a[2] + ONE_3 * b[2];
return o;
}
function wNewTrisect (a, b) {
return [TWO_3 * a[0] + ONE_3 * b[0],
TWO_3 * a[1] + ONE_3 * b[1],
TWO_3 * a[2] + ONE_3 * b[2]];
}
function wLetZero (o) {
o[0] = 0;
o[1] = 0;
o[2] = 0;
return o;
}
function wNewZero () {
return [0,
0,
0];
}
function mConcatenate (m, a) {
let a11 = a[0], a12 = a[1], a13 = a[2];
let a21 = a[3], a22 = a[4], a23 = a[5];
let m11 = m[0], m12 = m[1], m13 = m[2];
let m21 = m[3], m22 = m[4], m23 = m[5];
m[0] = a11 * m11 + a12 * m21;
m[1] = a11 * m12 + a12 * m22;
m[2] = a11 * m13 + a12 * m23 + a13;
m[3] = a21 * m11 + a22 * m21;
m[4] = a21 * m12 + a22 * m22;
m[5] = a21 * m13 + a22 * m23 + a23;
return m;
}
function mLetConcatenate (o, m, a) {
let a11 = a[0], a12 = a[1], a13 = a[2];
let a21 = a[3], a22 = a[4], a23 = a[5];
let m11 = m[0], m12 = m[1], m13 = m[2];
let m21 = m[3], m22 = m[4], m23 = m[5];
o[0] = a11 * m11 + a12 * m21;
o[1] = a11 * m12 + a12 * m22;
o[2] = a11 * m13 + a12 * m23 + a13;
o[3] = a21 * m11 + a22 * m21;
o[4] = a21 * m12 + a22 * m22;
o[5] = a21 * m13 + a22 * m23 + a23;
return o;
}
function mNewConcatenate (m, a) {
let a11 = a[0], a12 = a[1], a13 = a[2];
let a21 = a[3], a22 = a[4], a23 = a[5];
let m11 = m[0], m12 = m[1], m13 = m[2];
let m21 = m[3], m22 = m[4], m23 = m[5];
return [a11 * m11 + a12 * m21, a11 * m12 + a12 * m22, a11 * m13 + a12 * m23 + a13,
a21 * m11 + a22 * m21, a21 * m12 + a22 * m22, a21 * m13 + a22 * m23 + a23];
}
function mLetCopy (o, m) {
o[0] = m[0];
o[1] = m[1];
o[2] = m[2];
o[3] = m[3];
o[4] = m[4];
o[5] = m[5];
return o;
}
function mNewCopy (m) {
return m.concat ();
}