|
@@ -856,6 +856,18 @@ namespace Godot
|
|
|
return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z) && Mathf.IsEqualApprox(w, other.w);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Returns <see langword="true"/> if this vector's values are approximately zero,
|
|
|
+ /// by running <see cref="Mathf.IsZeroApprox(real_t)"/> on each component.
|
|
|
+ /// This method is faster than using <see cref="IsEqualApprox"/> with one value
|
|
|
+ /// as a zero vector.
|
|
|
+ /// </summary>
|
|
|
+ /// <returns>Whether or not the vector is approximately zero.</returns>
|
|
|
+ public readonly bool IsZeroApprox()
|
|
|
+ {
|
|
|
+ return Mathf.IsZeroApprox(x) && Mathf.IsZeroApprox(y) && Mathf.IsZeroApprox(z) && Mathf.IsZeroApprox(w);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Serves as the hash function for <see cref="Vector4"/>.
|
|
|
/// </summary>
|