diff --git a/compiler/res/prog8lib/virtual/floats.p8 b/compiler/res/prog8lib/virtual/floats.p8 index cec04aa40..976f733a2 100644 --- a/compiler/res/prog8lib/virtual/floats.p8 +++ b/compiler/res/prog8lib/virtual/floats.p8 @@ -124,6 +124,20 @@ sub rndseedf(float seed) { } +sub minf(float f1, float f2) -> float { + if f1 float { + if f1>f2 + return f1 + return f2 +} + + sub clampf(float value, float minimum, float maximum) -> float { if value allows for word arrays of length 256 and faster indexing this is an enormous amout of work, if this type is to be treated equally as existing (u)word , because all expression / lookup / assignment routines need to know about the distinction.... So maybe only allow the bare essentials? (store, get, bitwise operations?)