mirror of
https://github.com/aap/librw.git
synced 2024-11-25 21:25:42 +00:00
removed ugly imag/real from quat again
This commit is contained in:
parent
d8d13d4429
commit
43190a51f7
@ -248,12 +248,8 @@ Quat makeQuat(float32 w, const V3d &vec);
|
|||||||
|
|
||||||
struct Quat
|
struct Quat
|
||||||
{
|
{
|
||||||
// order is important for streaming
|
// order is important for streaming and RW compatibility
|
||||||
union {
|
float32 x, y, z, w;
|
||||||
struct { float32 x, y, z, w; };
|
|
||||||
// needed for RW compatibility
|
|
||||||
struct { V3d imag; float32 real; };
|
|
||||||
};
|
|
||||||
|
|
||||||
static Quat rotation(float32 angle, const V3d &axis){
|
static Quat rotation(float32 angle, const V3d &axis){
|
||||||
return makeQuat(cos(angle/2.0f), scale(normalize(axis), sin(angle/2.0f))); }
|
return makeQuat(cos(angle/2.0f), scale(normalize(axis), sin(angle/2.0f))); }
|
||||||
|
Loading…
Reference in New Issue
Block a user