Skip to content

jpreiss/quatcompress

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

quatcompress

Compress a normalized quaternion into 32 bits.

Single C header file with static inline functions.

On random quaternions, mean error is 0.08 degrees and worst-case error is 0.25 degrees.

Always returns a quaternion where the element of largest magnitude is positive. This saves 1 bit, but it creates the possibility that quaternion elements will flip signs when the underlying rotation only changes slightly. Since q and -q represent the same rotation, code that uses quaternions correctly should be able to handle sign flips without any problem.

About

Compress a unit quaternion into 32 bits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages