2-29-(8)
Calculation
Section 2-29
2.
Arithmetic Operators
3.
Functions
Operators
Meaning
+
Addition
-
Subtraction
*
Multiplication
/
Real number division
Function
Meaning
ABS
Calculates the absolute value.
ABS(argument)
MOD
Calculates the remainder when a number is divided by an ordinal
number.
MOD(dividend, ordinal number)
When multiplication and division are performed and real numbers
are used, the real numbers are rounded off to the nearest integer.
The result is the remainder from the division of the integer.
Examples
MOD(13, 4) = 1 (Remainder when 13 is divided by 4.)
MOD(25.68, 6.99) = 5 (Remainder when 26 is divided by 7.)
MAX
Gives the larger of two arguments.
MAX(argument 1, argument 2)
MIN
Gives the smaller of two arguments.
MIN(argument 1, argument 2)
SQRT
Calculates the square root. If the argument is negative, the calcu-
lation result will be 0 and the judgement will be NG.
SQRT(argument)
SIN
Calculates the sine. The result will be given between
-
1 and 1.
The angle in the expression is specified in degrees.
SIN(expression)
COS
Calculates the cosine. The result will be given between
-
1 and 1.
The angle in the expression is specified in degrees.
COS(expression)
ANGL
Calculates the angle between a straight line joining two points,
such as the center of gravity or the center of a model, and a hori-
zontal line. The result will be in the range
-
180 to 180
.
ANGL(Y component, X component)
Example: Set the following to calculate the angle between the
straight line joining the center of gravity for region 0 and the cen-
ter of gravity for region 1 and a horizontal line.
If both arguments are 0, the result will also be 0 and the judge-
ment will be NG.
First point
Second point
Horizontal line
ANGL(R1.Y-R0.Y,R1.X-R0.X)