Skip to content

Commit ef7982d

Browse files
committed
Struct based BufferObjects and Std140 layout
1 parent 4797356 commit ef7982d

33 files changed

+2074
-0
lines changed

jme3-core/src/main/java/com/jme3/math/FastMath.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,4 +1135,13 @@ public static short convertFloatToHalf(float flt) {
11351135
public static float unInterpolateLinear(float value, float min, float max) {
11361136
return (value - min) / (max - min);
11371137
}
1138+
1139+
/**
1140+
* Round n to a multiple of p
1141+
*/
1142+
public static int toMultipleOf(int n, int p) {
1143+
return ((n - 1) | (p - 1)) + 1;
1144+
}
1145+
1146+
11381147
}

0 commit comments

Comments
 (0)