Contact Us 1-800-596-4880

Math (dw::util::Math)

A utility module that provides mathematical functions.

To use this module, you must import it to your DataWeave code, for example, by adding the line import * from dw::util::Math to the header of your DataWeave script.

Introduced in DataWeave version 2.4.0.

Functions

Name Description

acos

Returns an arc cosine value that can range from 0.0 through pi.

asin

Returns an arc sine value that can range from -pi/2 through pi/2.

atan

Returns an arc tangent value that can range from -pi/2 through pi/2.

cos

Returns the trigonometric cosine of an angle from a given number of radians.

log10

Returns the logarithm base 10 of a number.

logn

Returns the natural logarithm (base e) of a number.

sin

Returns the trigonometric sine of an angle from a given number of radians.

tan

Returns the trigonometric tangent of an angle from a given number of radians.

toDegrees

Converts an angle measured in radians to an approximately equivalent number of degrees.

toRadians

Converts a given number of degrees in an angle to an approximately equivalent number of radians.

Variables