vmult method

Vector3 vmult(
  1. Vector3 v,
  2. Vector3? target
)

Matrix-Vector multiplication @param v The vector to multiply with @param target Optional, target to save the result in.

Implementation

Vector3 vmult(Vector3 v, Vector3? target){
  target ??= Vector3.zero();
  final e = storage;
  final x = v.x;
  final y = v.y;
  final z = v.z;
  target.x = e[0] * x + e[1] * y + e[2] * z;
  target.y = e[3] * x + e[4] * y + e[5] * z;
  target.z = e[6] * x + e[7] * y + e[8] * z;

  return target;
}