Package com.adobe.fontengine.math
Class F16Dot16
- java.lang.Object
-
- com.adobe.fontengine.math.F16Dot16
-
public class F16Dot16 extends Object
Constants and operations on fixed 16.16 numbers. The valuev is represented by theint
value 2^16 *v .
-
-
Constructor Summary
Constructors Constructor Description F16Dot16()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
divide(int v1, int v2)
Divide a 16.16 by a 16.16, result is a 16.16.static int
fromDouble(double v)
Convert a double to a 16.16.static int
fromInt(int v)
Convert an int to a 16.16.static int
multiply(int v1, int v2)
Multiply two 16.16, result is a 16.16.static int
multiplyByF2Dot14(int v1, int v2)
Multiply a 16.16 by a 2.14, result is 16.16.static int
multiplyDivide(int v1, int v2, int v3)
Multiply a 16.16 by a 16.16 and divive by a 16.16, result is a 16.16.static int
round(int v)
Round a 16.16, half-up , result is a 16.16.static int
square(int v)
Square of a 16.16, result is a 16.16.static double
toDouble(int v)
Convert a 16.16 to a double.static String
toString(int v)
Convert a 16.16 to a decimal representation.static int
truncate(int v)
Truncate the decimal part of a 16.16, result is a 16.16.
-
-
-
Field Detail
-
ZERO
public static final int ZERO
- See Also:
- Constant Field Values
-
ONE
public static final int ONE
- See Also:
- Constant Field Values
-
ONE_HALF
public static final int ONE_HALF
- See Also:
- Constant Field Values
-
-
Method Detail
-
truncate
public static int truncate(int v)
Truncate the decimal part of a 16.16, result is a 16.16.
-
multiply
public static int multiply(int v1, int v2)
Multiply two 16.16, result is a 16.16.
-
square
public static int square(int v)
Square of a 16.16, result is a 16.16.
-
multiplyByF2Dot14
public static int multiplyByF2Dot14(int v1, int v2)
Multiply a 16.16 by a 2.14, result is 16.16.
-
multiplyDivide
public static int multiplyDivide(int v1, int v2, int v3)
Multiply a 16.16 by a 16.16 and divive by a 16.16, result is a 16.16.
-
divide
public static int divide(int v1, int v2)
Divide a 16.16 by a 16.16, result is a 16.16.
-
round
public static int round(int v)
Round a 16.16, half-up , result is a 16.16.
-
toDouble
public static double toDouble(int v)
Convert a 16.16 to a double.
-
fromDouble
public static int fromDouble(double v)
Convert a double to a 16.16.
-
fromInt
public static int fromInt(int v)
Convert an int to a 16.16.
-
toString
public static String toString(int v)
Convert a 16.16 to a decimal representation.
-
-