org.openmali.number
Class RadicalUtils

java.lang.Object
  extended by org.openmali.number.RadicalUtils

public class RadicalUtils
extends java.lang.Object

Helper functionality for conversion of Radical1 to floats and vice versa


Field Summary
static java.util.HashSet<Radical1> approximators
           
 
Constructor Summary
RadicalUtils()
           
 
Method Summary
static Radical1 convert(float val)
           
static Matrix3rad convert(Matrix3f matrix3f)
           
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.
static Matrix4f convert(Matrix4rad rotation)
           
static Matrix4f convert(Matrix4rad rotation, Matrix4f passback)
           
static java.util.HashSet<Matrix4rad> removeRedundantRadicals(java.util.Set<Matrix4rad> data)
          this is a useful IO class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

approximators

public static java.util.HashSet<Radical1> approximators
Constructor Detail

RadicalUtils

public RadicalUtils()
Method Detail

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: