Add WithDistance
This commit is contained in:
parent
69bad8f662
commit
407e7712c6
@ -107,6 +107,12 @@ template <>
|
||||
const SphericalOf<signed short> SphericalOf<signed short>::zero =
|
||||
SphericalOf(0.0f, AngleOf<signed short>(0), AngleOf<signed short>(0));
|
||||
|
||||
template <typename T>
|
||||
SphericalOf<T> SphericalOf<T>::WithDistance(float distance) {
|
||||
SphericalOf<T> v = SphericalOf<T>(distance, this->horizontal, this->vertical);
|
||||
return SphericalOf<T>();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
SphericalOf<T> SphericalOf<T>::operator-() const {
|
||||
SphericalOf<T> v =
|
||||
|
@ -51,6 +51,8 @@ class SphericalOf {
|
||||
/// @brief A normalized down-oriented vector
|
||||
const static SphericalOf<T> down;
|
||||
|
||||
SphericalOf<T> WithDistance(float distance);
|
||||
|
||||
/// @brief Negate the vector
|
||||
/// @return The negated vector
|
||||
/// This will rotate the vector by 180 degrees horizontally and
|
||||
|
Loading…
x
Reference in New Issue
Block a user