Convert a float to 16.16 fixed-point representation
//package edu.dhbw.andobjviewer.util;
// Much of this is adapted from the beartronics FP lib
class FixedPointUtils {
publicstaticfinalint ONE = 0x10000;
/**
* Convert a float to 16.16 fixed-point representation
* @param val The value to convert
* @return The resulting fixed-point representation
*/
publicstaticint toFixed(float val) {
return (int)(val * 65536F);
}
}