Package com.io7m.junsigned.core
Class UnsignedFloat
java.lang.Object
com.io7m.junsigned.core.UnsignedFloat
Functions to convert unsigned integer values to/from values of
float.-
Method Summary
Modifier and TypeMethodDescriptionstatic floatfromUnsignedInt(int x) static floatfromUnsignedLong(long x) static floatmodulo(float x, float y) Calculate the unsigned modulox % y.static inttoUnsignedInt(float f) static longtoUnsignedLong(float f)
-
Method Details
-
fromUnsignedInt
public static float fromUnsignedInt(int x) - Parameters:
x- An unsigned integer value- Returns:
- The given unsigned integer value as a
float
-
toUnsignedInt
public static int toUnsignedInt(float f) - Parameters:
f- A floating point value- Returns:
- The given floating point value as an
int
-
fromUnsignedLong
public static float fromUnsignedLong(long x) - Parameters:
x- An unsigned integer value- Returns:
- The given unsigned integer value as a
float
-
toUnsignedLong
public static long toUnsignedLong(float f) - Parameters:
f- A floating point value- Returns:
- The given floating point value as a
long
-
modulo
Calculate the unsigned modulox % y.- Parameters:
x- The dividendy- The divisor- Returns:
- The unsigned modulo
x % y - Throws:
ArithmeticException- Iffy < 0
-