operator * method

dynamic operator *(
  1. 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 ArgumentError(arg);
}