Defines mathematical operation functions and types, including trigonometric functions, two-dimensional vectors, three-dimensional vectors, and matrices.
Data Structure Name
OHOS::Vector2< T >
Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction.
OHOS::Vector3< T >
Defines the 3-dimensional vector, and provides basic operators such as  and ==.
OHOS::Matrix3< T >
Defines a 3 x 3 matrix.
Macro Name and Value
MATH_MAX(a, b) ((a) > (b) ? (a) : (b))
Larger of a and b.
MATH_MIN(a, b) ((a) < (b) ? (a) : (b))
Smaller of a and b.
MATH_ABS(x) ((x) > 0 ? (x) : (-(x)))
Absolute value of x.
MATH_MINUS(a, b) ((a) < (b) ? ((b) - (a)) : ((a) - (b)))
Difference between a and b.