User Guide
Lingo Dictionary 49
vector1 - vector2 subtracts the values of vector2 from the corresponding components in
vector1 and returns a new vector.
vector - scaler subtracts the value of the scalar from each of the components in the vector and
returns a new vector.
* (multiplication)
Syntax
vector1 * vector2
vector * scalar
transform * vector
Description
3D vector operator; multiplies the components of vector1 by the corresponding components in
vector2, and returns the dot product, or multiplies each of the components the vector by the
scalar value and returns a new vector.
vector1 * vector2 returns the dot product of the two vectors, which is not a new vector. This
operation is the same as vector1.dotproduct.vector2.
vector
* scalar multiplies each of the components in the vector by the scalar value and returns
a new vector.
transform * vector multiplies the transform by the vector and returns a new vector. The new
vector is the result of applying the positional and rotational changes defined by transform to the
vector. Note that vector * transform is not supported.
See also
dotProduct()
/ (division)
Syntax
expression1 / expression2
Description
Math operator; performs an arithmetic division on two numerical expressions, dividing
expression1 by expression2. If both expressions are integers, the quotient is an integer. If
either or both expressions are floating-point numbers, the quotient is a floating-point number.
This is an arithmetic operator with a precedence level of 4.
Examples
This statement divides the integer 22 by 7 and then displays the result in the Message window:
put 22 / 7
The result is 3. Because both numbers in the division are integers, Lingo rounds the answer down
to the nearest integer.
This statement divides the floating-point number 22.0 by 7.0 and then displays the result in the
Message window:
put 22.0 / 7.0
The result is 3.1429, which is a floating-point number.