MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 604

Director scripting reference
Table of Contents

Advertisement

/ (division)
Usage
-- Lingo syntax
expression1 / expression2
// JavaScript syntax
expression1 / expression2
Description
Math operator; performs an arithmetic division on two numerical expressions, dividing
by
expression1
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.
Example
This statement divides the integer 22 by 7 and then displays the result in the Message window:
-- Lingo syntax
put(22 / 7)
// JavaScript syntax
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:
-- Lingo syntax
put(22.0 / 7.0)
// JavaScript syntax
put(22.0 / 7.0);
The result is 3.1429, which is a floating-point number.
/ (division) (3D)
Usage
-- Lingo syntax
vector / scalar
// JavaScript syntax
vector / scalar
Description
3D vector operator; divides each of the vector components by the scalar value and returns a
new vector.
604
Chapter 13: Operators
. If both expressions are integers, the quotient is an integer. If
expression2

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents