Math functions

Some common math functions.

The formalized behavior references a variety of input and output symbols, which can stand for variables or functions of the agent's software. Constants are constant decimal values.

Input Symbols

NameTypeMeasureDescription
randomdecimalA random number between 0 and 1

Input Functions

NameMeasureDescription / Parameters
distance-tommCalculates the distance to a specified point on the field
 
ParameterMeasureRangeDescription
distance-to.xmm-3000..3000The x position on the field
distance-to.ymm-2000..2000The y position on the field
angle-todegCalculates the angle to a specified point on the field
 
ParameterMeasureRangeDescription
angle-to.xmm-3000..3000The x position on the field
angle-to.ymm-2000..2000The y position on the field
sgn-1/1the sign of a number
 
ParameterMeasureRangeDescription
sgn.valuedecimalThe value for that the sign shall be calculated
absthe absolute value of a number
 
ParameterMeasureRangeDescription
abs.valuedecimalThe value for that the absolute value shall be calculated
minmmCalculates the minimum of two values
 
ParameterMeasureRangeDescription
min.value0mm..one value
min.value1mm..other value
maxmmCalculates the max of two values
 
ParameterMeasureRangeDescription
max.value0mm..one value
max.value1mm..other value
sinthe sin function
 
ParameterMeasureRangeDescription
sin.alphadeg-180..180alpha
costhe cos function
 
ParameterMeasureRangeDescription
cos.alphadeg-180..180alpha
normalizedegNormalized angle
 
ParameterMeasureRangeDescription
normalize.angledegAngle to be normalized
freezeThe frozen value
 
ParameterMeasureRangeDescription
freeze.valuedecimalValue to be frozen
is-in-intervalreturns 1 if value is between a and b
 
ParameterMeasureRangeDescription
is-in-interval.a
is-in-interval.b
is-in-interval.value
save-value
 
ParameterMeasureRangeDescription
save-value.indexnumber0..250
save-value.value
get-value
 
ParameterMeasureRangeDescription
get-value.indexnumber0..250

Output Symbols

NameTypeMeasureDescription
math.unfreeze-valueenumeratedtrue

Specifies, if the freeze function will freeze the next value.