Data Types \ Number \ Operations
Add
The Add response enables user to add two values by either typing in a numerical value in Number A and Number B field or by attaching a value or a variable node to those ports, then once the response is executed the resulting value can be acquired through the Result port.
Example
In this Example an Add Response is used to add the values of 5 to the value of Variable1 once the user triggers the object named Activate, and the result of the addition is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR Experience.
Subtract
The Subtract response enables user to subtract a value from another by either typing in a numerical value in Number A and Number B field or by attaching a value or a variable node to those ports, then once the response is executed the resulting value can be acquired through the Result port.
Example
In this Example a Subtract Response is used to subtract the value of Variable 1 from the value of the variable named Variable2, once the user triggers the object named Activate, and the result of the subtraction is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR Experience.
Multiply
The Multiply response enables user to multiply two values by either typing in a numerical value in Number A and Number B field or by attaching a value or a variable node to those ports, then once the response is executed the resulting value can be acquired through the Result port.
Example
In this Example a Subtract Response is used to subtract the value of Variable 1 from the value of the Variable 2, then a Multiply Response is used to multiply the subtraction result by 3 once the user triggers the object named Activate, and the result of the multiplication is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR Experience.
Divide
The Divide response enables user to divide a value by another value, by either typing in a numerical value in Number A and Number B field or by attaching a value or a variable node to those ports, then once the response is executed the resulting value can be acquired through the Result port.
Example
In this Example a Divide Response is used to divide the number 25 by the value of the variable named "Variable1" and the result of the division is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR Experience.
Ceiling
The Ceiling response enables the user to round up a value by either typing in a numerical value in the Number A field or by attaching a value or a variable node to that port. Then once the response is executed, the smallest integral value greater than or equal to the input value can be acquired through the Result port.
Example
In this example, a Ceiling Response is used to round up the value of Variable1 to the smallest integral value greater than or equal to it once the user triggers the object named Activate. The result of the ceiling operation is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR experience.
Floor
The Floor response enables the user to round down a value by either typing in a numerical value in the Number A field or by attaching a value or a variable node to that port. Then once the response is executed, the largest integral value less than or equal to the input value can be acquired through the Result port.
Example
In this example, a Floor Response is used to round down the value of Variable1 to the largest integral value less than or equal to it once the user triggers the object named Activate. The result of the floor operation is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR experience.
The Modulo response enables the user to find the remainder of a division by either typing in numerical values in the Number A and Number B fields or by attaching values or variable nodes to those ports. Then once the response is executed, the modulus of the input value with respect to the divisor can be acquired through the Result port.
Example
In this example, a Modulo Response is used to calculate the remainder when the value of the variable named Variable2 is divided by the value of Variable1, once the user triggers the object named Activate. The result of the modulo operation is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR experience.
Square Root
The Square Root response enables the user to calculate the square root of a value by either typing in a numerical value in the Number field or by attaching a value or a variable node to that port. Then once the response is executed, the square root of the input value can be acquired through the Result port.
Example
In this example, a Square Root response is used to calculate the square root of the value of Variable1 once the user triggers the object named Activate. The result of the square root operation is then written in a variable named Result, which can then be connected to a variable writer to be displayed during the VR experience.
No Comments