there is a bug with comparing FastFloats and regular floats on static targets if they are stored in Dynamic type variables. I'm not sure if it can be fixed easily or if it should be handled by the programmer (= avoiding the Dynamic type in those cases).
Minimal example code, tested on Krom and Windows C target:
var a: kha.FastFloat = 4.123;
var b: Float = 4.120;
// Without those two lines, both C and Krom targets would print 'true'
var aD: Dynamic = a;
var bD: Dynamic = b;
// Krom: true, C: false
trace(aD >= bD);
Also, casting FastFloat values back to floats does not always work on static targets, but I wasn't able to find a minimal reproducible example yet. The error message is Unsupported type value Single when compiling .hx code like v1 = cast(v1, Float); (v1 is a dynamic variable that holds a FastFloat).
Hi Robert,
there is a bug with comparing FastFloats and regular floats on static targets if they are stored in
Dynamic
type variables. I'm not sure if it can be fixed easily or if it should be handled by the programmer (= avoiding the Dynamic type in those cases).Minimal example code, tested on Krom and Windows C target:
For more details see https://github.com/armory3d/armory/issues/1814. It doesn't look like a Windows issue, it happens on the native Android target as well.
Also, casting FastFloat values back to floats does not always work on static targets, but I wasn't able to find a minimal reproducible example yet. The error message is
Unsupported type value Single
when compiling .hx code likev1 = cast(v1, Float);
(v1 is a dynamic variable that holds a FastFloat).Thanks!