call method

  1. @override
Object call(
  1. Interpreter interpreter,
  2. List<Object?> arguments,
  3. Map<Symbol, Object?> namedArguments
)
override

Implementation

@override
Object call(Interpreter interpreter, List<Object?> arguments,
    Map<Symbol, Object?> namedArguments) {
  if (arguments.length < 3) {
    throw "scale requires 3 arguments";
  }
  double x = parseDouble(arguments[0]) ?? 0;
  double y = parseDouble(arguments[1]) ?? 0;
  double z = parseDouble(arguments[2]) ?? 0;
  return Matrix4.diagonal3Values(x, y, z);
}