• An expression that multiplies the result of the given expressions.

      var _ = ExpressionFactory;
    //Evaluates to 2.
    var number = _.multiply(_.number(1), _.number(2));
    //Evaluates to (2, 4, 6).
    var point = _.multiply(_.point({x: 1, y: 2, z: 3}), _.number(2));

    Type Parameters

    • T extends string | number | Vector3

    Parameters

    • left: Expression<T>

      The first expression to evaluate. Should result in a number, point or color.

    • right: Expression<number | T>

      The second expression to evaluate. Should result in the same type as left or a number.

    Returns Expression<T>

    An expression that multiplies the results of the given expressions. Results in a number, point or color depending on the type of the operands. When a number is used with an other type, the operation is applied to the individual element values and the result is of the other type.