translate method

  1. @Deprecated('Use translateByVector3, translateByVector4, ' 'or translateByDouble instead')
void translate(
  1. dynamic x, [
  2. double y = 0.0,
  3. double z = 0.0
])

Translate this matrix by a Vector3, Vector4, or x,y,z as doubles.

If you know the argument types in a call site, prefer translateByDouble, translateByVector3, or translateByVector4 for performance.

Implementation

@pragma('wasm:prefer-inline')
@pragma('vm:prefer-inline')
@pragma('dart2js:prefer-inline')
@Deprecated('Use translateByVector3, translateByVector4, '
    'or translateByDouble instead')
void translate(dynamic x, [double y = 0.0, double z = 0.0]) {
  if (x is Vector3) {
    translateByVector3(x);
  } else if (x is Vector4) {
    translateByVector4(x);
  } else if (x is double) {
    translateByDouble(x, y, z, 1.0);
  } else {
    throw UnimplementedError();
  }
}