Skip to main content

Math

Block Name
Block
Description
Vector3

Construct a Vector3 variable with the specified values.

  • x: Number value for the 'x' value of the Vector3.
  • y: Number value for the 'y' value of the Vector3.
  • z: Number value for the 'z' value of the Vector3.
  • Output: The constructed Vector3 variable or the separate x/y/z values
Color

Construct a Color variable with the specified values in RGBA color standard.

  • R: Number value for the Red value of the Color.
  • G: Number value for the Green value of the Color.
  • B: Number value for the Blue value of the Color.
  • A: Number value for the Alpha value (transparency) of the Color
  • Output: The constructed Color variable.
OR

Perform logical operation "OR". Return true if any of the input Boolean value is true, and false only if both input Boolean value is false.

  • A: First Boolean value for the logical operation.
  • B: Second Boolean value for the logical operation.
  • Output: Boolean value of the logical result.
AND

Perform logical operation "AND". Return true if both the input Boolean values are true, return false otherwise.

  • A: First Boolean value for the logical operation.
  • B: Second Boolean value for the logical operation.
  • Output: Boolean value of the logical result.
NOT

Perform logical operation "NOT". Return the reverse of the input Boolean value.

  • A: Boolean value for the logical operation.
  • Output: Boolean value of the logical result.
Add

Perform the arithmetic operation "Addition".

  • A: Number value to be augend.
  • B: Number value to be augend.
  • Output: The sum of two number values.
Subtract

Perform the arithmetic operation "Subtraction".

  • A: Number value to be augend.
  • B: Number value to be augend.
  • Output: The difference of two number values.
Multiply

Perform the arithmetic operation "Multiplication".

  • A: Number value to be multiplier
  • B: Number value to be multiplicand.
  • Output: The product of two number values.
Divide

Perform the arithmetic operation "Division".

  • A: Number value to be augend.
  • B: Number value to be augend.
  • Output: The quotient of two number values.
Random Number (Float)

Get a random number value as a Float between a range.

  • Min: Lower Bound (Inclusive) of the random number value.
  • Max: Upper Bound (Exclusive) of the random number value.
  • Result: Random Float value between the Min and Max values.
Random Number (Integer)

Get a random number value as an Integer between a range.

  • Min: Lower Bound (Inclusive) of the random number value.
  • Max: Upper Bound (Exclusive) of the random number value.
  • Result: Random Integer value between the Min and Max values.
Compare

Compare the values of two numbers on a chosen math operation and return the result as a Boolean value.

  • A: Number value to be comparison.
  • B: Number value to be comparator.
  • Operator: Type of operations to compare two values, including ">" greater than, "<" less than, "==" equal to, ">=" greater than or equal to, "<=" less than or equal to, and "!=" not equal to.
  • Result: Boolean value of the comparison result.
Quotient

Returns the quotient from dividing two numbers together.

  • A: Number value corresponding to the numerator.
  • B: Number value corresponding to the denominator.
  • Output: The quotient from dividing two numbers together.
Remainder

Returns the remainder from dividing two numbers together.

  • A: Number value corresponding to the numerator.
  • B: Number value corresponding to the denominator.
  • Output: The remainder from dividing two numbers together.
Rounding

Rounds the provided number into an integer.

  • Rounding Operation: Value indicating how the provided number would be rounded. Operations include: Round off (Round to nearest integer), Round up and Round down.
  • Input: Number value to be rounded.
  • Output: The rounded Number value
Power

Performs the arithmetic operation "Power".

  • Base: Number corresponding to the base.
  • B: Number corresponding to the exponent.
  • Output: The value: Base to the power of Exponent.
Log

Computes the logarithm of an input value with respect to a base value.

  • Base: Number value to the base of the logarithm.
  • Input: Number value to compute the logarithm of.
  • Output: The logarithm of the Input value in base Base.
Math Constant

Provides the value of commonly used mathematical constants.

  • Constant: The constant of interest. Avaliable constants: PI and Euler's number
  • Output: The value of the selected constant.
Sin

Returns the sine of an angle.

  • Input: Number value corresponding to the angle in degrees.
  • Output: The sine of the provided angle.
Cos

Returns the cosine of an angle.

  • Input: Number value corresponding to the angle in degrees.
  • Output: The cosine of the provided angle.
Tan

Returns the tangent of an angle.

  • Input: Number value corresponding to the angle in degrees.
  • Output: The tangent of the provided angle.
Vector3 Add

Returns the sum of two vectors.

  • A: Vector3 value to add.
  • B: Vector3 value to add.
  • Output: The sum of the two provided vectors.
Vector3 Subtract

Returns the difference of two vectors.

  • A: Vector3 value to subtract from.
  • B: Vector3 value to subtract.
  • Output: The difference of the two provided vectors.
  • Vector3 Multiply

    Performs element-wise multiplication between two vectors.

    • A: Vector3 value to multiply.
    • B: Vector3 value to multiply.
    • Output: A vector where each element are the corresponding elements from the provided vectors multiplied together.
    Vector3 Divide

    Performs element-wise division between two vectors.

    • A: Vector3 value to use as the numerator.
    • B: Vector3 value to use as the denominator.
    • Output: A vector where each element is the division result of the corresponding elements in the provided vectors.
    Vector3 Distance

    Returns the distance between two points.

    • A: Vector3 value representing a point of interest.
    • B: Vector3 value representing a point of interest.
    • Output: The distance between the provided two points.
    Vector3 Magnitude

    Returns the size of a vector.

    • Input: Vector3 value corresponding to the vector to calculate the size of.
    • Output: The magnitude of the provided vector.
    Vector3 Normalize

    Returns a vector that faces the same direction as the provided vector.

    • Input: Vector3 value to normalize.
    • Output: A vector that faces the same direction as the provided vector with a magnitude of 1. If the provided vector is too close to the zero vector, then the zero vector is returned instead.
    Vector3 Dot Product

    Returns the dot product between two vectors.

    • A: Vector3 value of interest.
    • B: Vector3 value of interest.
    • Output: The sum of all the elements in a vector computed from the element-wise multiplcation of the two provided vectors.
    Vector3 Cross

    Returns the cross product between two vectors.

    • A: Vector3 value of interest.
    • B: Vector3 value of interest.
    • Output: A vector perpendicular to both the provided vectors that has the product between the magnitude of the provided vectors and the sine of the angle between them as the magnitude. If there is a zero vector among the provided vectors, a zero vector is returned instead.