diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-21 09:23:36 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-21 09:23:36 -0600 |
commit | d2468fcc0bd63e163a7a0564fa37b7880e2209df (patch) | |
tree | daa370c61245ca92fbcd50e7603c147a619a625e /redist | |
parent | 8a0831f2b9e458d8f1976c27f7865166ad8de6a4 (diff) | |
download | libsurvive-d2468fcc0bd63e163a7a0564fa37b7880e2209df.tar.gz libsurvive-d2468fcc0bd63e163a7a0564fa37b7880e2209df.tar.bz2 |
Fixed nullptr issue in poser_sba
Diffstat (limited to 'redist')
-rw-r--r-- | redist/linmath.c | 3 | ||||
-rw-r--r-- | redist/linmath.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/redist/linmath.c b/redist/linmath.c index 16f771e..d005074 100644 --- a/redist/linmath.c +++ b/redist/linmath.c @@ -653,3 +653,6 @@ void InvertPose(LinmathPose *poseout, const LinmathPose *pose) { quatrotatevector(poseout->Pos, poseout->Rot, pose->Pos); scale3d(poseout->Pos, poseout->Pos, -1); } + +LinmathQuat LinmathQuat_Identity = {1.0}; +LinmathPose LinmathPose_Identity = {.Rot = {1.0}}; diff --git a/redist/linmath.h b/redist/linmath.h index 782a13d..cacb1c6 100644 --- a/redist/linmath.h +++ b/redist/linmath.h @@ -56,6 +56,9 @@ typedef struct LinmathPose { LinmathQuat Rot; } LinmathPose; +extern LinmathQuat LinmathQuat_Identity; +extern LinmathPose LinmathPose_Identity; + //NOTE: Inputs may never be output with cross product. void cross3d( FLT * out, const FLT * a, const FLT * b ); |