diff options
| author | Franklin Wei <me@fwei.tk> | 2019-05-30 23:03:58 -0400 |
|---|---|---|
| committer | Franklin Wei <me@fwei.tk> | 2019-05-30 23:03:58 -0400 |
| commit | f9be2ace4ca871d7ad68c1a4dbdcff87511d838b (patch) | |
| tree | 56dee4cf1b75b22f990c7aa169c7c57bb1116c3b /include/fml/quat.h | |
| parent | ad380a22d4fc6b0fbd54388b79c93e736ff90e03 (diff) | |
| download | libfml-f9be2ace4ca871d7ad68c1a4dbdcff87511d838b.zip libfml-f9be2ace4ca871d7ad68c1a4dbdcff87511d838b.tar.gz libfml-f9be2ace4ca871d7ad68c1a4dbdcff87511d838b.tar.bz2 libfml-f9be2ace4ca871d7ad68c1a4dbdcff87511d838b.tar.xz | |
Add some useful stuff
Diffstat (limited to 'include/fml/quat.h')
| -rw-r--r-- | include/fml/quat.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/fml/quat.h b/include/fml/quat.h index 14c966e..67a89d5 100644 --- a/include/fml/quat.h +++ b/include/fml/quat.h @@ -15,11 +15,15 @@ namespace fml { quat(vec3 vec); quat(); - operator vec3(); + operator vec3() const; quat conjugate() const; + /* returns <cos / 2, x * sin / 2, y * sin / 2, z * sin / 2> */ static quat from_angleaxis(scalar angle, vec3 axis); + + /* returns rotquat * this * rotquat.conj */ + quat rotateby(const quat &rotquat) const; }; quat operator*(const quat &, const quat &); |