operator * method

dynamic operator * (dynamic arg)

Returns a new vector or matrix by multiplying this with arg.

Implementation

dynamic operator *(dynamic arg) {
  if (arg is double) {
    return scaled(arg);
  }
  if (arg is Vector3) {
    return transformed(arg);
  }
  if (arg is Matrix3) {
    return multiplied(arg);
  }
  throw new ArgumentError(arg);
}