21 template <
typename T,
typename S>
22 auto quaternionFromAxisAngle(Vec3<T> axis, S angle)
23 -> Quaternion<decltype(T(0) * std::sin(S(0)))> {
24 Quaternion<decltype(T(0) * std::sin(S(0)))> q;
26 auto sa2 = std::sin(a2);
37 std::string quaternionRep(Quaternion<T> in) {
38 std::string out(
"Quaternion: ");
39 out += internal::numberToRep(in.w);
40 out +=
" + " + internal::numberToRep(in.x) +
" * i";
41 out +=
" + " + internal::numberToRep(in.y) +
" * j";
42 out +=
" + " + internal::numberToRep(in.z) +
" * k";
47 std::ostream& operator<<(std::ostream& out, const Quaternion<T> q) {
48 return (out << quaternionRep(q));
This file is part of the Lumina Graphics Framework.