Open OrdinaryMagician opened 1 year ago
I can't reproduce this, was this fixed?
Something to ask @Gutawer.
I'm still seeing the error, so it wasn't.
I'm still seeing the error, so it wasn't.
Dunno, I even added a print statement in it so I knew it was getting called and it is, just...no error.
Could be OS-specific, then.
Yeah. Surely by now you know I'm on Mac :P
And I'm on Linux. This might be a GCC quirk (again...)
I'm on Linux and use Clang. It's probable that this just coincidentally worked on my machine but I'm not really in a state where I'm going to look into a fix anytime soon. In the meantime it's worth noting that Conjugate
is just the same as q.xyz = -q.xyz;
, and you probably don't need Inverse
.
I do have an use case for Inverse, though. I need to "undo" a rotation on a vector so I can make BobWeapon3D move the weapon in world space instead of view space.
Conjugate
does that and is computationally faster. This maybe needs to be cleared up a bit but it's the normal naming convention - Inverse
is the true inverse function which works on every quaternion, no matter its norm. Conjugate
is extremely similar to Inverse
and it is equal to Inverse
on unit quaternions (i.e. every quaternion you'll ever use for rotation), but fails to provide an inverse on non-unit quaterions. So 99% of use-cases would better served by Conjugate
.
I see.
PR is #1978
GZDoom version
4.10.0
Which game are you running with GZDoom?
Doom 2
What Operating System are you using?
Linux x86_64
Please describe your specific OS version
No response
Relevant hardware info
No response
Have you checked that no other similar issue already exists?
A clear and concise description of what the bug is.
Calling
Inverse()
orConjugate()
on any quaternion will result in a JIT error mentioning an "unexpected register type for self pointer".A simple example is provided here: zscript.txt
Steps to reproduce the behaviour.
Your configuration
No response
Provide a Log
No response