
602
Chapter 13: Operators
+ (addition)
Usage
-- Lingo syntax
expression1
+
expression2
// JavaScript syntax
expression1
+
expression2
Description
Math operator; performs an arithmetic sum on two numerical expressions. If both expressions are
integers, the sum is an integer. If either or both expressions are floating-point numbers, the sum is
a floating-point number.
This is an arithmetic operator with a precedence level of 4.
Example
This statement adds the integers 2 and 3 and then displays the result, 5, an integer, in the
Message window:
-- Lingo syntax
put(2 + 3)
// JavaScript syntax
put(2 + 3);
This statement adds the floating-point numbers 2.5 and 3.25 and displays the result, 5.7500, a
floating-point number, in the Message window:
-- Lingo syntax
put(2.5 + 3.25)
// JavaScript syntax
put(2.5 + 3.25);
+ (addition) (3D)
Usage
-- Lingo syntax
vector1
+
vector2
vector
+
scalar
// JavaScript syntax
vector1
+
vector2
vector
+
scalar
Description
3D vector operator; adds the components of two vectors, or adds the scalar value to each
component of the vector and returns a new vector.
vector1
+
vector2
adds the components of
vector1
to the corresponding to components of
vector2
and returns a new vector.
vector
+
scalar
adds the scalar value to each of the components of the vector and returns a
new vector.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...