MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / fromAngles

Method fromAngles

source/core/StarVector.hpp:789–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787template <typename T, size_t N>
788template <size_t P>
789auto Vector<T, N>::fromAngles(T psi, T theta) -> Enable3D<P, Vector<T, N>> {
790 Vec3F nv;
791 T cosTheta = T(cos(theta));
792
793 nv.x() = T(cos(psi));
794 nv.y() = T(sin(psi));
795 nv.x() *= cosTheta;
796 nv.y() *= cosTheta;
797 nv.z() = T(-sin(theta));
798 return nv;
799}
800
801template <typename T, size_t N>
802template <size_t P>

Callers

nothing calls this directly

Calls 3

xMethod · 0.80
yMethod · 0.80
zMethod · 0.80

Tested by

no test coverage detected