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

Method psi

source/core/StarVector.hpp:737–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735template <typename T, size_t N>
736template <size_t P>
737auto Vector<T, N>::psi() const -> Enable3D<P, T> {
738 Vector<T, N> vn = norm(*this);
739 T tmp = T(fabs(vn.z()));
740 if (tmp > 0.99999) {
741 return 0.0;
742 } else {
743 return T(atan2(vn.y(), vn.x()));
744 }
745}
746
747template <typename T, size_t N>
748template <size_t P>

Callers

nothing calls this directly

Calls 3

zMethod · 0.80
yMethod · 0.80
xMethod · 0.80

Tested by

no test coverage detected