-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM Target Crash (Same code does not crash in Java or other targets) #10965
Comments
I've reduced the inverse down to just this and can still repro the same crash: static public function inverse(_this : Mat3): Mat3 {
var m:Mat3Data = _this;
var a = m.c2.z;
var b = 2.;
var c = -a * b; // this fails? why? can not assign a float to an object?
return new Mat3(c, 0.0, 0.0, c, 0.0, 0.0, c, 0.0, 0.0);
}
|
class Main {
static public function main() {
var a:Single = 0;
var c = -a;
}
} Looks like it's just the minus Single. I guess I didn't pay much attention to singles. |
well, that was a much simpler issue than I was expecting. |
Yeah single-precision floats aren't used a whole lot. Out of curiosity, why are you using them for a math library? |
Because it's styled after shader math, it's intended to support different precisions for speed purposes. It supports both singles and doubles. The irony is that I've been doing some benchmarks, and on my apple m1, the doubles are faster than singles. I'm not sure the same is true of x86 though. |
Thanks for fixing this so quickly Simon!!! |
Hi,
I'm trying to get a relatively simple math example running in the jam target and I'm getting this:
And the code is just a matrix inverse:
I've included the code in case it's helpful. Again it works for hash link and java targets.
Code.zip
The text was updated successfully, but these errors were encountered: