operator * method
dynamic
operator *(
- dynamic arg
Returns a new vector or matrix by multiplying this with arg
.
arg
should be a double (to scale), Vector4 (to transform), Vector3
(to transform), or Matrix4 (to multiply).
If you know the argument type in a call site, prefer scaledByDouble, transformed, transformed3, or multiplied for performance.
Implementation
@pragma('wasm:prefer-inline')
@pragma('vm:prefer-inline')
@pragma('dart2js:prefer-inline')
dynamic operator *(dynamic arg) {
final Object result;
if (arg is double) {
result = scaledByDouble(arg, arg, arg, 1.0);
} else if (arg is Vector4) {
result = transformed(arg);
} else if (arg is Vector3) {
result = transformed3(arg);
} else if (arg is Matrix4) {
result = multiplied(arg);
} else {
throw ArgumentError(arg);
}
return result;
}