Updated PolarOf, removed default Polar type
This commit is contained in:
parent
94a3105a61
commit
6f30334e12
146
Polar.cpp
146
Polar.cpp
@ -21,6 +21,18 @@ template <typename T> PolarOf<T>::PolarOf(float distance, AngleOf<T> angle) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
PolarOf<T> PolarOf<T>::Degrees(float distance, float degrees) {
|
||||||
|
AngleOf<T> angle = AngleOf<T>::Degrees(degrees);
|
||||||
|
PolarOf<T> r = PolarOf<T>(distance, angle);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
PolarOf<T> PolarOf<T>::Radians(float distance, float radians) {
|
||||||
|
return PolarOf<T>(distance, AngleOf<T>::Radians(radians));
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T> PolarOf<T> PolarOf<T>::FromVector2(Vector2 v) {
|
template <typename T> PolarOf<T> PolarOf<T>::FromVector2(Vector2 v) {
|
||||||
float distance = v.magnitude();
|
float distance = v.magnitude();
|
||||||
AngleOf<T> angle =
|
AngleOf<T> angle =
|
||||||
@ -133,136 +145,4 @@ PolarOf<T> PolarOf<T>::Rotate(const PolarOf &v, AngleOf<T> angle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template class PolarOf<float>;
|
template class PolarOf<float>;
|
||||||
template class PolarOf<signed short>;
|
template class PolarOf<signed short>;
|
||||||
|
|
||||||
//=====================================
|
|
||||||
/*
|
|
||||||
Polar::Polar() {
|
|
||||||
this->distance = 0.0f;
|
|
||||||
this->angle = 0.0f;
|
|
||||||
}
|
|
||||||
Polar::Polar(float distance, Angle angle) {
|
|
||||||
// distance should always be 0 or greater
|
|
||||||
if (distance < 0.0f) {
|
|
||||||
this->distance = -distance;
|
|
||||||
this->angle = Angle::Normalize(angle.ToFloat() - 180.0f);
|
|
||||||
} else {
|
|
||||||
this->distance = distance;
|
|
||||||
if (this->distance == 0.0f)
|
|
||||||
// angle is always 0 if distance is 0
|
|
||||||
this->angle = 0.0f;
|
|
||||||
else
|
|
||||||
this->angle = Angle::Normalize(angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Polar::Polar(Vector2 v) {
|
|
||||||
this->distance = v.magnitude();
|
|
||||||
this->angle = Vector2::SignedAngle(Vector2::forward, v);
|
|
||||||
}
|
|
||||||
Polar::Polar(Spherical v) {
|
|
||||||
this->distance = v.distance * cosf(v.verticalAngle.ToFloat() *
|
|
||||||
Passer::LinearAlgebra::Deg2Rad);
|
|
||||||
this->angle = v.horizontalAngle;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Polar Polar::zero = Polar(0.0f, 0.0f);
|
|
||||||
const Polar Polar::forward = Polar(1.0f, 0.0f);
|
|
||||||
const Polar Polar::back = Polar(1.0, 180.0f);
|
|
||||||
const Polar Polar::right = Polar(1.0, 90.0f);
|
|
||||||
const Polar Polar::left = Polar(1.0, -90.0f);
|
|
||||||
|
|
||||||
bool Polar::operator==(const Polar& v) const {
|
|
||||||
return (this->distance == v.distance &&
|
|
||||||
this->angle.ToFloat() == v.angle.ToFloat());
|
|
||||||
}
|
|
||||||
|
|
||||||
Polar Polar::Normalize(const Polar& v) {
|
|
||||||
Polar r = Polar(1, v.angle);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
Polar Polar::normalized() const {
|
|
||||||
Polar r = Polar(1, this->angle);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
Polar Polar::operator-() const {
|
|
||||||
Polar v = Polar(this->distance, this->angle.ToFloat() + 180.0f);
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
Polar Polar::operator-(const Polar& v) const {
|
|
||||||
Polar r = -v;
|
|
||||||
return *this + r;
|
|
||||||
}
|
|
||||||
Polar Polar::operator-=(const Polar& v) {
|
|
||||||
*this = *this - v;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
Polar Polar::operator+(const Polar& v) const {
|
|
||||||
if (v.distance == 0)
|
|
||||||
return Polar(this->distance, this->angle);
|
|
||||||
if (this->distance == 0.0f)
|
|
||||||
return v;
|
|
||||||
|
|
||||||
float deltaAngle =
|
|
||||||
Angle::Normalize(v.angle.ToFloat() - this->angle.ToFloat()).ToFloat();
|
|
||||||
float rotation =
|
|
||||||
deltaAngle < 0.0f ? 180.0f + deltaAngle : 180.0f - deltaAngle;
|
|
||||||
|
|
||||||
if (rotation == 180.0f && v.distance > 0.0f) {
|
|
||||||
// angle is too small, take this angle and add the distances
|
|
||||||
return Polar(this->distance + v.distance, this->angle);
|
|
||||||
}
|
|
||||||
|
|
||||||
float newDistance =
|
|
||||||
Angle::CosineRuleSide(v.distance, this->distance, rotation).ToFloat();
|
|
||||||
|
|
||||||
float angle =
|
|
||||||
Angle::CosineRuleAngle(newDistance, this->distance,
|
|
||||||
v.distance).ToFloat();
|
|
||||||
|
|
||||||
float newAngle = deltaAngle < 0.0f ? this->angle.ToFloat() - angle
|
|
||||||
: this->angle.ToFloat() + angle;
|
|
||||||
newAngle = Angle::Normalize(newAngle).ToFloat();
|
|
||||||
Polar vector = Polar(newDistance, newAngle);
|
|
||||||
return vector;
|
|
||||||
}
|
|
||||||
Polar Polar::operator+=(const Polar& v) {
|
|
||||||
*this = *this + v;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Polar Passer::LinearAlgebra::operator*(const Polar &v, float f) {
|
|
||||||
// return Polar(v.distance * f, v.angle);
|
|
||||||
// }
|
|
||||||
// Polar Passer::LinearAlgebra::operator*(float f, const Polar &v) {
|
|
||||||
// return Polar(v.distance * f, v.angle);
|
|
||||||
// }
|
|
||||||
Polar Polar::operator*=(float f) {
|
|
||||||
this->distance *= f;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
// Polar Passer::LinearAlgebra::operator/(const Polar& v, float f) {
|
|
||||||
// return Polar(v.distance / f, v.angle);
|
|
||||||
// }
|
|
||||||
// Polar Passer::LinearAlgebra::operator/(float f, const Polar& v) {
|
|
||||||
// return Polar(v.distance / f, v.angle);
|
|
||||||
// }
|
|
||||||
Polar Polar::operator/=(float f) {
|
|
||||||
this->distance /= f;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Polar::Distance(const Polar& v1, const Polar& v2) {
|
|
||||||
float d = Angle::CosineRuleSide(v1.distance, v2.distance,
|
|
||||||
v2.angle.ToFloat() - v1.angle.ToFloat())
|
|
||||||
.ToFloat();
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
Polar Polar::Rotate(const Polar& v, Angle angle) {
|
|
||||||
Angle a = Angle::Normalize(v.angle.ToFloat() + angle.ToFloat());
|
|
||||||
Polar r = Polar(v.distance, a);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
*/
|
|
178
Polar.h
178
Polar.h
@ -11,12 +11,10 @@ namespace Passer {
|
|||||||
namespace LinearAlgebra {
|
namespace LinearAlgebra {
|
||||||
|
|
||||||
struct Vector2;
|
struct Vector2;
|
||||||
template <typename T>
|
template <typename T> class SphericalOf;
|
||||||
class SphericalOf;
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T> class PolarOf {
|
||||||
class PolarOf {
|
public:
|
||||||
public:
|
|
||||||
/// @brief The distance in meters
|
/// @brief The distance in meters
|
||||||
/// @remark The distance shall never be negative
|
/// @remark The distance shall never be negative
|
||||||
float distance;
|
float distance;
|
||||||
@ -33,6 +31,24 @@ class PolarOf {
|
|||||||
/// @note The distance is automatically converted to a positive value.
|
/// @note The distance is automatically converted to a positive value.
|
||||||
/// @note The angle is automatically normalized to -180 .. 180
|
/// @note The angle is automatically normalized to -180 .. 180
|
||||||
PolarOf(float distance, AngleOf<T> angle);
|
PolarOf(float distance, AngleOf<T> angle);
|
||||||
|
|
||||||
|
/// @brief Create polar vector without using AngleOf type. All given angles
|
||||||
|
/// are in degrees
|
||||||
|
/// @param distance The distance in meters
|
||||||
|
/// @param degrees The angle in degrees
|
||||||
|
/// @return The polar vector
|
||||||
|
static PolarOf<T> Degrees(float distance, float degrees);
|
||||||
|
/// @brief Short-hand Deg alias for the Degrees function
|
||||||
|
constexpr static auto Deg = Degrees;
|
||||||
|
/// @brief Create polar vector without using AngleOf type. All given angles
|
||||||
|
/// are in radians.
|
||||||
|
/// @param distance The distance in meters
|
||||||
|
/// @param radians The angle in radians
|
||||||
|
/// @return The polar vector
|
||||||
|
static PolarOf<T> Radians(float distance, float radians);
|
||||||
|
/// @brief Short-hand Rad alias for the Radians function
|
||||||
|
constexpr static auto Rad = Radians;
|
||||||
|
|
||||||
/// @brief Convert a vector from 2D carthesian coordinates to polar
|
/// @brief Convert a vector from 2D carthesian coordinates to polar
|
||||||
/// coordinates
|
/// coordinates
|
||||||
/// @param v The vector to convert
|
/// @param v The vector to convert
|
||||||
@ -58,12 +74,12 @@ class PolarOf {
|
|||||||
/// @return true: if it is identical to the given vector
|
/// @return true: if it is identical to the given vector
|
||||||
/// @note This uses float comparison to check equality which may have
|
/// @note This uses float comparison to check equality which may have
|
||||||
/// strange effects. Equality on floats should be avoided.
|
/// strange effects. Equality on floats should be avoided.
|
||||||
bool operator==(const PolarOf& v) const;
|
bool operator==(const PolarOf &v) const;
|
||||||
|
|
||||||
/// @brief The vector length
|
/// @brief The vector length
|
||||||
/// @param v The vector for which you need the length
|
/// @param v The vector for which you need the length
|
||||||
/// @return The vector length;
|
/// @return The vector length;
|
||||||
inline static float Magnitude(const PolarOf& v) { return v.distance; }
|
inline static float Magnitude(const PolarOf &v) { return v.distance; }
|
||||||
/// @brief The vector length
|
/// @brief The vector length
|
||||||
/// @return The vector length
|
/// @return The vector length
|
||||||
inline float magnitude() const { return this->distance; }
|
inline float magnitude() const { return this->distance; }
|
||||||
@ -71,7 +87,7 @@ class PolarOf {
|
|||||||
/// @brief Convert the vector to a length of 1
|
/// @brief Convert the vector to a length of 1
|
||||||
/// @param v The vector to convert
|
/// @param v The vector to convert
|
||||||
/// @return The vector normalized to a length of 1
|
/// @return The vector normalized to a length of 1
|
||||||
static PolarOf Normalize(const PolarOf& v);
|
static PolarOf Normalize(const PolarOf &v);
|
||||||
/// @brief Convert the vector to a length of a
|
/// @brief Convert the vector to a length of a
|
||||||
/// @return The vector normalized to a length of 1
|
/// @return The vector normalized to a length of 1
|
||||||
PolarOf normalized() const;
|
PolarOf normalized() const;
|
||||||
@ -84,23 +100,23 @@ class PolarOf {
|
|||||||
/// @brief Subtract a polar vector from this vector
|
/// @brief Subtract a polar vector from this vector
|
||||||
/// @param v The vector to subtract
|
/// @param v The vector to subtract
|
||||||
/// @return The result of the subtraction
|
/// @return The result of the subtraction
|
||||||
PolarOf operator-(const PolarOf& v) const;
|
PolarOf operator-(const PolarOf &v) const;
|
||||||
PolarOf operator-=(const PolarOf& v);
|
PolarOf operator-=(const PolarOf &v);
|
||||||
/// @brief Add a polar vector to this vector
|
/// @brief Add a polar vector to this vector
|
||||||
/// @param v The vector to add
|
/// @param v The vector to add
|
||||||
/// @return The result of the addition
|
/// @return The result of the addition
|
||||||
PolarOf operator+(const PolarOf& v) const;
|
PolarOf operator+(const PolarOf &v) const;
|
||||||
PolarOf operator+=(const PolarOf& v);
|
PolarOf operator+=(const PolarOf &v);
|
||||||
|
|
||||||
/// @brief Scale the vector uniformly up
|
/// @brief Scale the vector uniformly up
|
||||||
/// @param f The scaling factor
|
/// @param f The scaling factor
|
||||||
/// @return The scaled vector
|
/// @return The scaled vector
|
||||||
/// @remark This operation will scale the distance of the vector. The angle
|
/// @remark This operation will scale the distance of the vector. The angle
|
||||||
/// will be unaffected.
|
/// will be unaffected.
|
||||||
friend PolarOf operator*(const PolarOf& v, float f) {
|
friend PolarOf operator*(const PolarOf &v, float f) {
|
||||||
return PolarOf(v.distance * f, v.angle);
|
return PolarOf(v.distance * f, v.angle);
|
||||||
}
|
}
|
||||||
friend PolarOf operator*(float f, const PolarOf& v) {
|
friend PolarOf operator*(float f, const PolarOf &v) {
|
||||||
return PolarOf(f * v.distance, v.angle);
|
return PolarOf(f * v.distance, v.angle);
|
||||||
}
|
}
|
||||||
PolarOf operator*=(float f);
|
PolarOf operator*=(float f);
|
||||||
@ -109,10 +125,10 @@ class PolarOf {
|
|||||||
/// @return The scaled factor
|
/// @return The scaled factor
|
||||||
/// @remark This operation will scale the distance of the vector. The angle
|
/// @remark This operation will scale the distance of the vector. The angle
|
||||||
/// will be unaffected.
|
/// will be unaffected.
|
||||||
friend PolarOf operator/(const PolarOf& v, float f) {
|
friend PolarOf operator/(const PolarOf &v, float f) {
|
||||||
return PolarOf(v.distance / f, v.angle);
|
return PolarOf(v.distance / f, v.angle);
|
||||||
}
|
}
|
||||||
friend PolarOf operator/(float f, const PolarOf& v) {
|
friend PolarOf operator/(float f, const PolarOf &v) {
|
||||||
return PolarOf(f / v.distance, v.angle);
|
return PolarOf(f / v.distance, v.angle);
|
||||||
}
|
}
|
||||||
PolarOf operator/=(float f);
|
PolarOf operator/=(float f);
|
||||||
@ -121,141 +137,21 @@ class PolarOf {
|
|||||||
/// @param v1 The first vector
|
/// @param v1 The first vector
|
||||||
/// @param v2 The second vector
|
/// @param v2 The second vector
|
||||||
/// @return The distance between the two vectors
|
/// @return The distance between the two vectors
|
||||||
static float Distance(const PolarOf& v1, const PolarOf& v2);
|
static float Distance(const PolarOf &v1, const PolarOf &v2);
|
||||||
|
|
||||||
/// @brief Rotate a vector
|
/// @brief Rotate a vector
|
||||||
/// @param v The vector to rotate
|
/// @param v The vector to rotate
|
||||||
/// @param a The angle in degreesto rotate
|
/// @param a The angle in degreesto rotate
|
||||||
/// @return The rotated vector
|
/// @return The rotated vector
|
||||||
static PolarOf Rotate(const PolarOf& v, AngleOf<T> a);
|
static PolarOf Rotate(const PolarOf &v, AngleOf<T> a);
|
||||||
};
|
};
|
||||||
|
|
||||||
using PolarSingle = PolarOf<float>;
|
using PolarSingle = PolarOf<float>;
|
||||||
using Polar16 = PolarOf<signed short>;
|
using Polar16 = PolarOf<signed short>;
|
||||||
using Polar = PolarSingle;
|
// using Polar = PolarSingle;
|
||||||
|
|
||||||
/*
|
} // namespace LinearAlgebra
|
||||||
/// @brief A polar vector
|
} // namespace Passer
|
||||||
/// @details This will use the polar coordinate system consisting of a angle
|
|
||||||
/// from a reference direction and a distance.
|
|
||||||
struct Polar {
|
|
||||||
public:
|
|
||||||
/// @brief The distance in meters
|
|
||||||
/// @remark The distance shall never be negative
|
|
||||||
float distance;
|
|
||||||
/// @brief The angle in degrees clockwise rotation
|
|
||||||
/// @remark The angle shall be between -180 .. 180
|
|
||||||
Angle angle;
|
|
||||||
|
|
||||||
/// @brief A new vector with polar coordinates with zero degrees and
|
|
||||||
/// distance
|
|
||||||
Polar();
|
|
||||||
/// @brief A new vector with polar coordinates
|
|
||||||
/// @param distance The distance in meters
|
|
||||||
/// @param angle The angle in degrees, clockwise rotation
|
|
||||||
/// @note The distance is automatically converted to a positive value.
|
|
||||||
/// @note The angle is automatically normalized to -180 .. 180
|
|
||||||
Polar(float distance, Angle angle);
|
|
||||||
/// @brief Convert a vector from 2D carthesian coordinates to polar
|
|
||||||
/// coordinates
|
|
||||||
/// @param v The vector to convert
|
|
||||||
Polar(Vector2 v);
|
|
||||||
/// @brief Convert a vector from spherical coordinates to polar coordinates
|
|
||||||
/// @param s The vector to convert
|
|
||||||
/// @note The resulting vector will be projected on the horizontal plane
|
|
||||||
Polar(Spherical s);
|
|
||||||
|
|
||||||
/// @brief A polar vector with zero degrees and distance
|
|
||||||
const static Polar zero;
|
|
||||||
/// @brief A normalized forward-oriented vector
|
|
||||||
const static Polar forward;
|
|
||||||
/// @brief A normalized back-oriented vector
|
|
||||||
const static Polar back;
|
|
||||||
/// @brief A normalized right-oriented vector
|
|
||||||
const static Polar right;
|
|
||||||
/// @brief A normalized left-oriented vector
|
|
||||||
const static Polar left;
|
|
||||||
|
|
||||||
/// @brief Equality test to another vector
|
|
||||||
/// @param v The vector to check against
|
|
||||||
/// @return true: if it is identical to the given vector
|
|
||||||
/// @note This uses float comparison to check equality which may have
|
|
||||||
/// strange effects. Equality on floats should be avoided.
|
|
||||||
bool operator==(const Polar& v) const;
|
|
||||||
|
|
||||||
/// @brief The vector length
|
|
||||||
/// @param v The vector for which you need the length
|
|
||||||
/// @return The vector length;
|
|
||||||
inline static float Magnitude(const Polar& v) { return v.distance; }
|
|
||||||
/// @brief The vector length
|
|
||||||
/// @return The vector length
|
|
||||||
inline float magnitude() const { return this->distance; }
|
|
||||||
|
|
||||||
/// @brief Convert the vector to a length of 1
|
|
||||||
/// @param v The vector to convert
|
|
||||||
/// @return The vector normalized to a length of 1
|
|
||||||
static Polar Normalize(const Polar& v);
|
|
||||||
/// @brief Convert the vector to a length of a
|
|
||||||
/// @return The vector normalized to a length of 1
|
|
||||||
Polar normalized() const;
|
|
||||||
|
|
||||||
/// @brief Negate the vector
|
|
||||||
/// @return The negated vector
|
|
||||||
/// This will rotate the vector by 180 degrees. Distance will stay the same.
|
|
||||||
Polar operator-() const;
|
|
||||||
|
|
||||||
/// @brief Subtract a polar vector from this vector
|
|
||||||
/// @param v The vector to subtract
|
|
||||||
/// @return The result of the subtraction
|
|
||||||
Polar operator-(const Polar& v) const;
|
|
||||||
Polar operator-=(const Polar& v);
|
|
||||||
/// @brief Add a polar vector to this vector
|
|
||||||
/// @param v The vector to add
|
|
||||||
/// @return The result of the addition
|
|
||||||
Polar operator+(const Polar& v) const;
|
|
||||||
Polar operator+=(const Polar& v);
|
|
||||||
|
|
||||||
/// @brief Scale the vector uniformly up
|
|
||||||
/// @param f The scaling factor
|
|
||||||
/// @return The scaled vector
|
|
||||||
/// @remark This operation will scale the distance of the vector. The angle
|
|
||||||
/// will be unaffected.
|
|
||||||
friend Polar operator*(const Polar& v, float f) {
|
|
||||||
return Polar(v.distance * f, v.angle);
|
|
||||||
}
|
|
||||||
friend Polar operator*(float f, const Polar& v) {
|
|
||||||
return Polar(f * v.distance, v.angle);
|
|
||||||
}
|
|
||||||
Polar operator*=(float f);
|
|
||||||
/// @brief Scale the vector uniformly down
|
|
||||||
/// @param f The scaling factor
|
|
||||||
/// @return The scaled factor
|
|
||||||
/// @remark This operation will scale the distance of the vector. The angle
|
|
||||||
/// will be unaffected.
|
|
||||||
friend Polar operator/(const Polar& v, float f) {
|
|
||||||
return Polar(v.distance / f, v.angle);
|
|
||||||
}
|
|
||||||
friend Polar operator/(float f, const Polar& v) {
|
|
||||||
return Polar(f / v.distance, v.angle);
|
|
||||||
}
|
|
||||||
Polar operator/=(float f);
|
|
||||||
|
|
||||||
/// @brief The distance between two vectors
|
|
||||||
/// @param v1 The first vector
|
|
||||||
/// @param v2 The second vector
|
|
||||||
/// @return The distance between the two vectors
|
|
||||||
static float Distance(const Polar& v1, const Polar& v2);
|
|
||||||
|
|
||||||
/// @brief Rotate a vector
|
|
||||||
/// @param v The vector to rotate
|
|
||||||
/// @param a The angle in degreesto rotate
|
|
||||||
/// @return The rotated vector
|
|
||||||
static Polar Rotate(const Polar& v, Angle a);
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
} // namespace LinearAlgebra
|
|
||||||
} // namespace Passer
|
|
||||||
using namespace Passer::LinearAlgebra;
|
using namespace Passer::LinearAlgebra;
|
||||||
|
|
||||||
#include "Spherical.h"
|
#include "Spherical.h"
|
||||||
|
@ -29,7 +29,7 @@ Vector2::Vector2(Vector3 v) {
|
|||||||
x = v.Right(); // x;
|
x = v.Right(); // x;
|
||||||
y = v.Forward(); // z;
|
y = v.Forward(); // z;
|
||||||
}
|
}
|
||||||
Vector2::Vector2(Polar p) {
|
Vector2::Vector2(PolarSingle p) {
|
||||||
float horizontalRad = p.angle.InDegrees() * Passer::LinearAlgebra::Deg2Rad;
|
float horizontalRad = p.angle.InDegrees() * Passer::LinearAlgebra::Deg2Rad;
|
||||||
float cosHorizontal = cosf(horizontalRad);
|
float cosHorizontal = cosf(horizontalRad);
|
||||||
float sinHorizontal = sinf(horizontalRad);
|
float sinHorizontal = sinf(horizontalRad);
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
|
|
||||||
TEST(Polar, FromVector2) {
|
TEST(Polar, FromVector2) {
|
||||||
Vector2 v = Vector2(0, 1);
|
Vector2 v = Vector2(0, 1);
|
||||||
Polar p = Polar::FromVector2(v);
|
PolarSingle p = PolarSingle::FromVector2(v);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance 0 1";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance 0 1";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "s.angle 0 0 1";
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "s.angle 0 0 1";
|
||||||
|
|
||||||
v = Vector2(1, 0);
|
v = Vector2(1, 0);
|
||||||
p = Polar::FromVector2(v);
|
p = PolarSingle::FromVector2(v);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance 1 0";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance 1 0";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 90.0F) << "s.angle 1 0";
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 90.0F) << "s.angle 1 0";
|
||||||
|
|
||||||
v = Vector2(-1, 1);
|
v = Vector2(-1, 1);
|
||||||
p = Polar::FromVector2(v);
|
p = PolarSingle::FromVector2(v);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, sqrt(2.0F)) << "p.distance -1 1";
|
EXPECT_FLOAT_EQ(p.distance, sqrt(2.0F)) << "p.distance -1 1";
|
||||||
EXPECT_NEAR(p.angle.InDegrees(), -45.0F, 1.0e-05) << "s.angle -1 1";
|
EXPECT_NEAR(p.angle.InDegrees(), -45.0F, 1.0e-05) << "s.angle -1 1";
|
||||||
@ -30,94 +30,96 @@ TEST(Polar, FromVector2) {
|
|||||||
|
|
||||||
TEST(Polar, FromSpherical) {
|
TEST(Polar, FromSpherical) {
|
||||||
SphericalSingle s;
|
SphericalSingle s;
|
||||||
Polar p;
|
PolarSingle p;
|
||||||
|
|
||||||
s = SphericalSingle(1, AngleSingle::Degrees(0), AngleSingle::Degrees(0));
|
s = SphericalSingle(1, DirectionSingle::forward);
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 0 0)";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 0 0)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(1 0 0)";
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(1 0 0)";
|
||||||
|
|
||||||
s = SphericalSingle(1, AngleSingle::Degrees(45), AngleSingle::Degrees(0));
|
s = SphericalSingle(1, AngleSingle::Degrees(45), AngleSingle::Degrees(0));
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 45 0)";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 45 0)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 45.0F)
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 45.0F)
|
||||||
<< "p.angle FromSpherical(1 45 0)";
|
<< "p.angle FromSpherical(1 45 0)";
|
||||||
|
|
||||||
s = SphericalSingle(1, AngleSingle::Degrees(-45), AngleSingle::Degrees(0));
|
s = SphericalSingle(1, AngleSingle::Degrees(-45), AngleSingle::Degrees(0));
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 -45 0)";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(1 -45 0)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), -45.0F)
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), -45.0F)
|
||||||
<< "p.angle FromSpherical(1 -45 0)";
|
<< "p.angle FromSpherical(1 -45 0)";
|
||||||
|
|
||||||
s = SphericalSingle(0, AngleSingle::Degrees(0), AngleSingle::Degrees(0));
|
s = SphericalSingle(0, AngleSingle::Degrees(0), AngleSingle::Degrees(0));
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 0.0F) << "p.distance FromSpherical(0 0 0)";
|
EXPECT_FLOAT_EQ(p.distance, 0.0F) << "p.distance FromSpherical(0 0 0)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(0 0 0)";
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(0 0 0)";
|
||||||
|
|
||||||
s = SphericalSingle(-1, AngleSingle::Degrees(0), AngleSingle::Degrees(0));
|
s = SphericalSingle(-1, AngleSingle::Degrees(0), AngleSingle::Degrees(0));
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(-1 0 0)";
|
EXPECT_FLOAT_EQ(p.distance, 1.0F) << "p.distance FromSpherical(-1 0 0)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), -180.0F)
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), -180.0F)
|
||||||
<< "p.angle FromSpherical(-1 0 0)";
|
<< "p.angle FromSpherical(-1 0 0)";
|
||||||
|
|
||||||
s = SphericalSingle(0, AngleSingle::Degrees(0), AngleSingle::Degrees(90));
|
s = SphericalSingle(0, AngleSingle::Degrees(0), AngleSingle::Degrees(90));
|
||||||
p = Polar::FromSpherical(s);
|
p = PolarSingle::FromSpherical(s);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(p.distance, 0.0F) << "p.distance FromSpherical(0 0 90)";
|
EXPECT_FLOAT_EQ(p.distance, 0.0F) << "p.distance FromSpherical(0 0 90)";
|
||||||
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(0 0 90)";
|
EXPECT_FLOAT_EQ(p.angle.InDegrees(), 0.0F) << "p.angle FromSpherical(0 0 90)";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Negation) {
|
TEST(Polar, Negation) {
|
||||||
Polar v = Polar(2, AngleSingle::Degrees(45));
|
PolarSingle v = PolarSingle(2, AngleSingle::Degrees(45));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = -v;
|
r = -v;
|
||||||
EXPECT_FLOAT_EQ(r.distance, 2);
|
EXPECT_FLOAT_EQ(r.distance, 2);
|
||||||
EXPECT_FLOAT_EQ(r.angle.InDegrees(), -135);
|
EXPECT_FLOAT_EQ(r.angle.InDegrees(), -135);
|
||||||
EXPECT_TRUE(r == Polar(2, AngleSingle::Degrees(-135))) << "Negate(2 45)";
|
EXPECT_TRUE(r == PolarSingle(2, AngleSingle::Degrees(-135)))
|
||||||
|
<< "Negate(2 45)";
|
||||||
|
|
||||||
v = Polar(2, AngleSingle::Degrees(-45));
|
v = PolarSingle::Deg(2, -45);
|
||||||
r = -v;
|
r = -v;
|
||||||
EXPECT_TRUE(r == Polar(2, AngleSingle::Degrees(135))) << "Negate(2 -45)";
|
EXPECT_TRUE(r == PolarSingle(2, AngleSingle::Degrees(135)))
|
||||||
|
<< "Negate(2 -45)";
|
||||||
|
|
||||||
v = Polar(2, AngleSingle::Degrees(0));
|
v = PolarSingle::Degrees(2, 0);
|
||||||
r = -v;
|
r = -v;
|
||||||
EXPECT_TRUE(r == Polar(2, AngleSingle::Degrees(180))) << "Negate(2 0)";
|
EXPECT_TRUE(r == PolarSingle(2, AngleSingle::Degrees(180))) << "Negate(2 0)";
|
||||||
|
|
||||||
v = Polar(0, AngleSingle::Degrees(0));
|
v = PolarSingle(0, AngleSingle::Degrees(0));
|
||||||
r = -v;
|
r = -v;
|
||||||
EXPECT_FLOAT_EQ(r.distance, 0.0f);
|
EXPECT_FLOAT_EQ(r.distance, 0.0f);
|
||||||
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 0.0f);
|
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 0.0f);
|
||||||
EXPECT_TRUE(r == Polar(0, AngleSingle::Degrees(0))) << "Negate(0 0)";
|
EXPECT_TRUE(r == PolarSingle(0, AngleSingle::Degrees(0))) << "Negate(0 0)";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Subtraction) {
|
TEST(Polar, Subtraction) {
|
||||||
Polar v1 = Polar(4, AngleSingle::Degrees(45));
|
PolarSingle v1 = PolarSingle(4, AngleSingle::Degrees(45));
|
||||||
Polar v2 = Polar(1, AngleSingle::Degrees(-90));
|
PolarSingle v2 = PolarSingle(1, AngleSingle::Degrees(-90));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = v1 - v2;
|
r = v1 - v2;
|
||||||
// don't know what to expect yet
|
// don't know what to expect yet
|
||||||
|
|
||||||
v2 = Polar::zero;
|
v2 = PolarSingle::zero;
|
||||||
r = v1 - v2;
|
r = v1 - v2;
|
||||||
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Subtraction(0 0)";
|
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Subtraction(0 0)";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Addition) {
|
TEST(Polar, Addition) {
|
||||||
Polar v1 = Polar(1, AngleSingle::Degrees(45));
|
PolarSingle v1 = PolarSingle(1, AngleSingle::Degrees(45));
|
||||||
Polar v2 = Polar(1, AngleSingle::Degrees(-90));
|
PolarSingle v2 = PolarSingle(1, AngleSingle::Degrees(-90));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = v1 - v2;
|
r = v1 - v2;
|
||||||
// don't know what to expect yet
|
// don't know what to expect yet
|
||||||
|
|
||||||
v2 = Polar::zero;
|
v2 = PolarSingle::zero;
|
||||||
r = v1 + v2;
|
r = v1 + v2;
|
||||||
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Addition(0 0)";
|
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Addition(0 0)";
|
||||||
|
|
||||||
@ -125,15 +127,15 @@ TEST(Polar, Addition) {
|
|||||||
r += v2;
|
r += v2;
|
||||||
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Addition(0 0)";
|
EXPECT_FLOAT_EQ(r.distance, v1.distance) << "Addition(0 0)";
|
||||||
|
|
||||||
v2 = Polar(1, AngleSingle::Degrees(-45));
|
v2 = PolarSingle(1, AngleSingle::Degrees(-45));
|
||||||
r = v1 + v2;
|
r = v1 + v2;
|
||||||
EXPECT_FLOAT_EQ(r.distance, sqrtf(2)) << "Addition(0 0 0)";
|
EXPECT_FLOAT_EQ(r.distance, sqrtf(2)) << "Addition(0 0 0)";
|
||||||
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 0) << "Addition(0 0 0)";
|
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 0) << "Addition(0 0 0)";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Scale_Multiply) {
|
TEST(Polar, Scale_Multiply) {
|
||||||
Polar v1 = Polar(4, AngleSingle::Degrees(45));
|
PolarSingle v1 = PolarSingle(4, AngleSingle::Degrees(45));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = v1 * 2.0f;
|
r = v1 * 2.0f;
|
||||||
EXPECT_FLOAT_EQ(r.distance, v1.distance * 2) << "ScaleMult(4 45, 2)";
|
EXPECT_FLOAT_EQ(r.distance, v1.distance * 2) << "ScaleMult(4 45, 2)";
|
||||||
@ -142,8 +144,8 @@ TEST(Polar, Scale_Multiply) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Scale_Divide) {
|
TEST(Polar, Scale_Divide) {
|
||||||
Polar v1 = Polar(4, AngleSingle::Degrees(45));
|
PolarSingle v1 = PolarSingle(4, AngleSingle::Degrees(45));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = v1 / 2.0f;
|
r = v1 / 2.0f;
|
||||||
EXPECT_FLOAT_EQ(r.distance, v1.distance / 2) << "ScaleDiv(4 45, 2)";
|
EXPECT_FLOAT_EQ(r.distance, v1.distance / 2) << "ScaleDiv(4 45, 2)";
|
||||||
@ -152,23 +154,23 @@ TEST(Polar, Scale_Divide) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Distance) {
|
TEST(Polar, Distance) {
|
||||||
Polar v1 = Polar(4, AngleSingle::Degrees(45));
|
PolarSingle v1 = PolarSingle(4, AngleSingle::Degrees(45));
|
||||||
Polar v2 = Polar(1, AngleSingle::Degrees(-90));
|
PolarSingle v2 = PolarSingle(1, AngleSingle::Degrees(-90));
|
||||||
float d = 0;
|
float d = 0;
|
||||||
|
|
||||||
d = Polar::Distance(v1, v2);
|
d = PolarSingle::Distance(v1, v2);
|
||||||
// don't know what to expect yet
|
// don't know what to expect yet
|
||||||
|
|
||||||
v2 = Polar::zero;
|
v2 = PolarSingle::zero;
|
||||||
d = Polar::Distance(v1, v2);
|
d = PolarSingle::Distance(v1, v2);
|
||||||
EXPECT_FLOAT_EQ(d, v1.distance) << "Distance(4 45, zero)";
|
EXPECT_FLOAT_EQ(d, v1.distance) << "Distance(4 45, zero)";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Polar, Rotate) {
|
TEST(Polar, Rotate) {
|
||||||
Polar v = Polar(4, AngleSingle::Degrees(45));
|
PolarSingle v = PolarSingle(4, AngleSingle::Degrees(45));
|
||||||
Polar r = Polar::zero;
|
PolarSingle r = PolarSingle::zero;
|
||||||
|
|
||||||
r = Polar::Rotate(v, AngleSingle::Degrees(45));
|
r = PolarSingle::Rotate(v, AngleSingle::Degrees(45));
|
||||||
EXPECT_FLOAT_EQ(r.distance, v.distance) << "Rotate(4 45, 45)";
|
EXPECT_FLOAT_EQ(r.distance, v.distance) << "Rotate(4 45, 45)";
|
||||||
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 90.0f) << "Rotate(4 45, 45)";
|
EXPECT_FLOAT_EQ(r.angle.InDegrees(), 90.0f) << "Rotate(4 45, 45)";
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ TEST(SphericalSingle, FromVector3) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(SphericalSingle, FromPolar) {
|
TEST(SphericalSingle, FromPolar) {
|
||||||
Polar p = Polar(1, AngleSingle::Degrees(0));
|
PolarSingle p = PolarSingle(1, AngleSingle::Degrees(0));
|
||||||
SphericalSingle s = SphericalSingle ::FromPolar(p);
|
SphericalSingle s = SphericalSingle ::FromPolar(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 0)";
|
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 0)";
|
||||||
@ -40,7 +40,7 @@ TEST(SphericalSingle, FromPolar) {
|
|||||||
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
||||||
<< "s.vert Polar(1 0)";
|
<< "s.vert Polar(1 0)";
|
||||||
|
|
||||||
p = Polar(1, AngleSingle::Degrees(45));
|
p = PolarSingle(1, AngleSingle::Degrees(45));
|
||||||
s = SphericalSingle ::FromPolar(p);
|
s = SphericalSingle ::FromPolar(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 45)";
|
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 45)";
|
||||||
@ -49,7 +49,7 @@ TEST(SphericalSingle, FromPolar) {
|
|||||||
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
||||||
<< "s.vert Polar(1 45)";
|
<< "s.vert Polar(1 45)";
|
||||||
|
|
||||||
p = Polar(1, AngleSingle::Degrees(-45));
|
p = PolarSingle(1, AngleSingle::Degrees(-45));
|
||||||
s = SphericalSingle ::FromPolar(p);
|
s = SphericalSingle ::FromPolar(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 -45)";
|
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(1 -45)";
|
||||||
@ -58,7 +58,7 @@ TEST(SphericalSingle, FromPolar) {
|
|||||||
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
||||||
<< "s.vert Polar(1 -45)";
|
<< "s.vert Polar(1 -45)";
|
||||||
|
|
||||||
p = Polar(0, AngleSingle::Degrees(0));
|
p = PolarSingle(0, AngleSingle::Degrees(0));
|
||||||
s = SphericalSingle ::FromPolar(p);
|
s = SphericalSingle ::FromPolar(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(s.distance, 0.0F) << "s.distance Polar(0 0)";
|
EXPECT_FLOAT_EQ(s.distance, 0.0F) << "s.distance Polar(0 0)";
|
||||||
@ -67,7 +67,7 @@ TEST(SphericalSingle, FromPolar) {
|
|||||||
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
EXPECT_FLOAT_EQ(s.direction.vertical.InDegrees(), 0.0F)
|
||||||
<< "s.vert Polar(0 0)";
|
<< "s.vert Polar(0 0)";
|
||||||
|
|
||||||
p = Polar(-1, AngleSingle::Degrees(0));
|
p = PolarSingle(-1, AngleSingle::Degrees(0));
|
||||||
s = SphericalSingle ::FromPolar(p);
|
s = SphericalSingle ::FromPolar(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(-1 0)";
|
EXPECT_FLOAT_EQ(s.distance, 1.0F) << "s.distance Polar(-1 0)";
|
||||||
|
@ -9,25 +9,25 @@
|
|||||||
|
|
||||||
TEST(Vector2, FromPolar) {
|
TEST(Vector2, FromPolar) {
|
||||||
Vector2 v;
|
Vector2 v;
|
||||||
Polar p;
|
PolarSingle p;
|
||||||
Vector2 r;
|
Vector2 r;
|
||||||
|
|
||||||
v = Vector2(0, 1);
|
v = Vector2(0, 1);
|
||||||
p = Polar::FromVector2(v);
|
p = PolarSingle::FromVector2(v);
|
||||||
r = Vector2(p);
|
r = Vector2(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(r.x, 0.0F) << "FromPolar(0 1)";
|
EXPECT_FLOAT_EQ(r.x, 0.0F) << "FromPolar(0 1)";
|
||||||
EXPECT_FLOAT_EQ(r.y, 1.0F) << "FromPolar(0 1)";
|
EXPECT_FLOAT_EQ(r.y, 1.0F) << "FromPolar(0 1)";
|
||||||
|
|
||||||
v = Vector2(1, 0);
|
v = Vector2(1, 0);
|
||||||
p = Polar::FromVector2(v);
|
p = PolarSingle::FromVector2(v);
|
||||||
r = Vector2(p);
|
r = Vector2(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(r.x, 1.0F) << "FromPolar(1 0)";
|
EXPECT_FLOAT_EQ(r.x, 1.0F) << "FromPolar(1 0)";
|
||||||
EXPECT_NEAR(r.y, 0.0F, 1.0e-07) << "FromPolar(1 0)";
|
EXPECT_NEAR(r.y, 0.0F, 1.0e-07) << "FromPolar(1 0)";
|
||||||
|
|
||||||
v = Vector2(0, 0);
|
v = Vector2(0, 0);
|
||||||
p = Polar::FromVector2(v);
|
p = PolarSingle::FromVector2(v);
|
||||||
r = Vector2(p);
|
r = Vector2(p);
|
||||||
|
|
||||||
EXPECT_FLOAT_EQ(r.x, 0.0F) << "FromPolar(0 0)";
|
EXPECT_FLOAT_EQ(r.x, 0.0F) << "FromPolar(0 0)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user