com.mascotcapsule.micro3d.v3
Class Util3D

java.lang.Object
  extended bycom.mascotcapsule.micro3d.v3.Util3D

public class Util3D
extends java.lang.Object

This is a utility class for the various 3DCG related operations.


Method Summary
static int cos(int p)
          Calcuates the cosine.
static int sin(int p)
          Calculates the sine.
static int sqrt(int p)
          Calculates the square root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sqrt

public static final int sqrt(int p)
Calculates the square root. Signs will be ignored.

Parameters:
p - Integer value
Returns:
Square root sqrt(p)

sin

public static final int sin(int p)
Calculates the sine. There are 4096 angles and 360 degrees. A result multiplied by 1024 will be returned.

Parameters:
p - Angles(4096 and 360 degrees)
Returns:
Operational result

cos

public static final int cos(int p)
Calcuates the cosine. There are 4096 angles and 360 degrees. A result multiplied by 1024 will be returned.

Parameters:
p - Angles(4096 and 360 degrees)
Returns:
Operational result