angleBetween

@FloatRange(from = 0.0, to = 6.283185307179586)
public final static Double angleBetween(ImmutablePosition positionA, ImmutablePosition positionB)

Calculates the angle between the given positions.

The method use the Math.atan2 for gets the angle.

Return

A value in the range from 0 to 2PI radians clockwise.

Parameters

positionA

The position A.

positionB

The position B


@FloatRange(from = 0.0, to = 6.283185307179586)
public final static Double angleBetween(Float xA, Float yA, Float xB, Float yB)

Calculates the angle between the given positions.

The method use the Math.atan2 for gets the angle.

Return

A value in the range from 0 to 2PI radians clockwise.

Parameters

xA

The x coordinate of the position A.

yA

The y coordinate of the position A.

xB

The x coordinate of the position B.

yB

The y coordinate of the position B.

See also