com.sharkysoft.fig.extra.math

## Class SharkysMath

• ```public class SharkysMath
extends Object```
Supplement to java.lang.Math.

Details: `SharkysMath` contains general-purpose math-related methods and constants.

Items in this class have high reuse potential and are suitable for future inclusion in `Math`.

Author:
Sharky
• ### Field Summary

Fields
Modifier and Type Field and Description
`static double` `TWO_PI`
Twice pi.
• ### Constructor Summary

Constructors
Constructor and Description
`SharkysMath()`
• ### Method Summary

Methods
Modifier and Type Method and Description
`static boolean` `isReal(double iValue)`
Tests if value is real.
`static boolean` `isReal(float iValue)`
Tests if value is real.
`static double` `normalizeDegrees(double iAngle)`
Modulates angle.
`static double` `normalizeRadians(double iAngle)`
Modulates angle.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### TWO_PI

`public static final double TWO_PI`
Twice pi.
Constant Field Values
• ### Constructor Detail

• #### SharkysMath

`public SharkysMath()`
• ### Method Detail

`public static double normalizeRadians(double iAngle)`
Modulates angle.

Details: `normalizeRadians` modulates the given angle, expressed in radians, so that it falls between -pi and +pi.

Parameters:
`iAngle` - angle to normalize
Returns:
normalized angle
• #### normalizeDegrees

`public static double normalizeDegrees(double iAngle)`
Modulates angle.

Details: `normalizeRadians` modulates the given angle, expressed in degrees, so that it falls between -pi and +pi.

Parameters:
`iAngle` - angle to normalize
Returns:
normalized angle
• #### isReal

`public static boolean isReal(float iValue)`
Tests if value is real.

Details: `isReal` returns `true` if the given value is "real." In other words, `isReal` returns `true` if the value is neither infinite nor NaN, `false` otherwise.

Parameters:
`iValue` - value to test
Returns:
true iff real
• #### isReal

`public static boolean isReal(double iValue)`
Tests if value is real.

Details: `isReal` returns `true` if the given value is "real." In other words, `isReal` returns `true` if the value is neither infinite nor NaN, `false` otherwise.

Parameters:
`iValue` - value to test
Returns:
true iff real