- allow bbox zoom to scale to MAX_END_SCALE

- use FastMath.clamp
This commit is contained in:
Hannes Janetzek
2013-03-11 18:54:11 +01:00
parent 2cb8a9d45f
commit c14d101aef
2 changed files with 11 additions and 21 deletions

View File

@@ -63,6 +63,10 @@ public class FastMath {
return (value < min ? min : (value > max ? max : value));
}
public static double clamp(double value, double min, double max) {
return (value < min ? min : (value > max ? max : value));
}
public static float clampN(float value) {
return (value < 0f ? 0f : (value > 1f ? 1f : value));
}