ArViewer  Android Version
Arvos - Augmented reality viewer open source
 All Classes Namespaces Files Functions Variables
Static Public Member Functions | Static Public Attributes | List of all members
com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils Class Reference

Static Public Member Functions

static int toFixed (float val)
 
static int[] toFixed (float[] arr)
 
static void toFixed (float[] arr, int[] storage)
 
static float toFloat (int val)
 
static float[] toFloat (int[] arr)
 
static void toFloat (int[] arr, float[] storage)
 
static int multiply (int x, int y)
 
static int divide (int x, int y)
 
static int sqrt (int n)
 

Static Public Attributes

static final int ONE = 0x10000
 

Detailed Description

Definition at line 24 of file FixedPointUtils.java.

Member Function Documentation

static int com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.divide ( int  x,
int  y 
)
static

Divide two fixed-point values.

Parameters
x
y
Returns

Definition at line 132 of file FixedPointUtils.java.

static int com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.multiply ( int  x,
int  y 
)
static

Multiply two fixed-point values.

Parameters
x
y
Returns

Definition at line 119 of file FixedPointUtils.java.

static int com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.sqrt ( int  n)
static

Find the sqrt of a fixed-point value.

Parameters
n
Returns

Definition at line 144 of file FixedPointUtils.java.

static int com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFixed ( float  val)
static

Convert a float to 16.16 fixed-point representation

Parameters
valThe value to convert
Returns
The resulting fixed-point representation

Definition at line 35 of file FixedPointUtils.java.

static int [] com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFixed ( float[]  arr)
static

Convert an array of floats to 16.16 fixed-point

Parameters
arrThe array
Returns
A newly allocated array of fixed-point values.

Definition at line 47 of file FixedPointUtils.java.

static void com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFixed ( float[]  arr,
int[]  storage 
)
static

Convert an array of floats to 16.16 fixed-point

Parameters
arrThe array of floats
storageThe location to store the fixed-point values.

Definition at line 62 of file FixedPointUtils.java.

static float com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFloat ( int  val)
static

Convert a 16.16 fixed-point value to floating point

Parameters
valThe fixed-point value
Returns
The equivalent floating-point value.

Definition at line 77 of file FixedPointUtils.java.

static float [] com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFloat ( int[]  arr)
static

Convert an array of 16.16 fixed-point values to floating point

Parameters
arrThe array to convert
Returns
A newly allocated array of floats.

Definition at line 89 of file FixedPointUtils.java.

static void com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.toFloat ( int[]  arr,
float[]  storage 
)
static

Convert an array of 16.16 fixed-point values to floating point

Parameters
arrThe array to convert
storagePre-allocated storage for the result.

Definition at line 104 of file FixedPointUtils.java.

Member Data Documentation

final int com.mission_base.arviewer_android.viewer.utilities.FixedPointUtils.ONE = 0x10000
static

Definition at line 26 of file FixedPointUtils.java.


The documentation for this class was generated from the following file: