ATan2 (open)

Returns the arctangent of a value divided by another value.

Syntax

LOADLIB "wh::float.whlib";

FLOAT FUNCTION ATan2(FLOAT value1, FLOAT value2)

Parameters

FLOAT value1

The first FLOAT value

FLOAT value2

The second FLOAT value

Return value

FLOAT

The arctangent of @italic value1 / @italic value2 in radians

Description

This functions calculates the division of value1 and value2 and returns the arctangent of the result. The result is even valid when value2 = 0 (i.e. when the resulting angle is PI/2 radians). When both value1 and value2 are 0, an argument out of domain error is given.

Examples

// The FLOAT value will be 0.4636...
FLOAT f := ATan2(1.25, 2.5);