Actually builds now (Sorry bout that)
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m13s
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 20s

This commit is contained in:
2024-08-05 18:24:51 -04:00
parent 6aa7dc9745
commit 11062e761a
11 changed files with 80 additions and 28 deletions

View File

@@ -178,6 +178,13 @@ public:
@see ScaledToLength(). */
float ScaleToLength(float newLength);
/// Returns a scaled copy of this vector which has its new length as given.
/** This function assumes the length of this vector is not zero. In the case of failure, an error message is printed,
and the vector (newLength, 0, 0) is returned.
@see ScaleToLength(). */
[[nodiscard]] Vector3 ScaledToLength(float newLength) const;
[[nodiscard]] Vector3 ProjectToNorm(const Vector3& direction) const;
@@ -225,11 +232,15 @@ public:
@see Perpendicular(), Cross(). */
Vector3 AnotherPerpendicular(const Vector3& hint = Vector3(0,1,0), const Vector3& hint2 = Vector3(0,0,1)) const;
/// Returns a scaled copy of this vector which has its new length as given.
/** This function assumes the length of this vector is not zero. In the case of failure, an error message is printed,
and the vector (newLength, 0, 0) is returned.
@see ScaleToLength(). */
Vector3 ScaledToLength(float newLength) const;
/// Completes this vector to generate a perpendicular basis.
/** This function computes two new vectors b and c which are both orthogonal to this vector and to each other.
That is, the set { this, b, c} is an orthogonal set. The vectors b and c that are outputted are also normalized.
@param outB [out] Receives vector b.
@param outC [out] Receives vector c.
@note When calling this function, this vector should not be zero! */
void PerpendicularBasis(Vector3& outB, Vector3& outC) const;
[[nodiscard]] Vector3 Min(const Vector3& min) const;
static Vector3 Min(const Vector3& a, const Vector3& b, const Vector3& c);
@@ -282,8 +293,8 @@ public:
/// Returns a copy of this vector, resized to have a magnitude of 1, while preserving "direction"
/// @note If the vector is zero and cannot be normalized, the vector (1, 0, 0) is returned, and an error message is printed.
/// If you do not want to generate an error message on failure, but want to handle the failure yourself, use the Normalize() function instead.
/// @see Normalize()
/// If you do not want to generate an error message on failure, but want to handle the failure yourself, use the Normalized() function instead.
/// @see Normalized()
[[nodiscard]] Vector3 Normalized() const;
static Vector3 Normalized(const Vector3& targ);