initial commit

This commit is contained in:
2025-10-09 14:37:45 +03:00
commit 1baccc1311
15 changed files with 335 additions and 0 deletions

20
source/Utils.mc Normal file
View File

@ -0,0 +1,20 @@
import Toybox.Lang;
typedef Numeric as Number or Float or Long or Double;
// no types here, because this is generic, which are not supported by language
function getOrElse(value, defaultValue) {
if (value == null) {
return defaultValue;
} else {
return value;
}
}
function min(left as Numeric, right as Numeric) as Numeric {
if (left < right) {
return left;
} else {
return right;
}
}