org.openmali.number
Class RadicalUtils
java.lang.Object
org.openmali.number.RadicalUtils
public class RadicalUtils
- extends java.lang.Object
Helper functionality for conversion of Radical1 to floats and vice versa
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
approximators
public static java.util.HashSet<Radical1> approximators
RadicalUtils
public RadicalUtils()
convert
public static Matrix4rad convert(Matrix4f rotation)
- converts the normal floating point representation into the radical form
this only works for certain trigonomic constants like 30 degree angles etc.
- Parameters:
rotation -
- Returns:
convert
public static Matrix4f convert(Matrix4rad rotation)
convert
public static Matrix4f convert(Matrix4rad rotation,
Matrix4f passback)
convert
public static Matrix3rad convert(Matrix3f matrix3f)
convert
public static Radical1 convert(float val)
removeRedundantRadicals
public static java.util.HashSet<Matrix4rad> removeRedundantRadicals(java.util.Set<Matrix4rad> data)
- this is a useful IO class. It takes a set of matrix radicals, and uses extensive
sharing of rational and radical1 instances to produce an equivelent represenentaions
which uses dramatically less numbers of individual objects (so this can be saved alot faster)
However, note the resultant set becomes read only though
- Parameters:
data -
- Returns: