java.lang.Object
io.github.shimeoki.jfx.rasterization.Ints
Class for some operations on integers that are not in the standard
Math class.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic intconfined(int low, int x, int high) Returns an integer that is the confined value ofxfor two bounds.static intmax3(int v1, int v2, int v3) Gets a maximum integer out of three values.static intmin3(int v1, int v2, int v3) Gets a minumum integer out of three values.
-
Method Details
-
confined
public static int confined(int low, int x, int high) Returns an integer that is the confined value ofxfor two bounds.If
xis less thanlow, thenlowis returned.If
xis more thanhigh, thenhighis returned.Otherwise
xis returned.- Parameters:
low- lower boundx- target integer to confinehigh- upper bound- Returns:
- confined integer
- Since:
- 2.0.0
-
min3
public static int min3(int v1, int v2, int v3) Gets a minumum integer out of three values.- Parameters:
v1- first integerv2- second integerv3- third integer- Returns:
- minimum integer out of three values
- Since:
- 2.0.0
-
max3
public static int max3(int v1, int v2, int v3) Gets a maximum integer out of three values.- Parameters:
v1- first integerv2- second integerv3- third integer- Returns:
- maximum integer out of three values
- Since:
- 2.0.0
-