aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Utils.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2021-08-29 22:08:50 +0300
committerRblSb <msrblsb@gmail.com>2021-08-29 22:08:50 +0300
commit6cb22fb04d83e0bc1046dd980736d97768928725 (patch)
treef9c4ca2ebb4d84e9c39e26945dcdd287d153e20a /src/server/Utils.hx
parente2c76dece4ba9daf1dcce338026339c17c9bd6cd (diff)
Fix int32 overflow
closes #29
Diffstat (limited to 'src/server/Utils.hx')
-rw-r--r--src/server/Utils.hx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/Utils.hx b/src/server/Utils.hx
index 9aa0d66..a2f4382 100644
--- a/src/server/Utils.hx
+++ b/src/server/Utils.hx
@@ -69,6 +69,10 @@ class Utils {
return "127.0.0.1";
}
+ public static function isOutOfRange(value:Float, min:Float, max:Float):Bool {
+ return value == null || Math.isNaN(value) || value < min || value > max;
+ }
+
public static function sortedPush(ids:Array<Int>, id:Int):Void {
for (i => n in ids) {
if (id < n) {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage