diff --git a/Source/Engine/Core/Math/FloatR10G10B10A2.cs b/Source/Engine/Core/Math/FloatR10G10B10A2.cs index 100b849e7..223133b66 100644 --- a/Source/Engine/Core/Math/FloatR10G10B10A2.cs +++ b/Source/Engine/Core/Math/FloatR10G10B10A2.cs @@ -118,13 +118,12 @@ namespace FlaxEngine } /// - /// Converts the value of the object to its equivalent string representation. + /// Returns a that represents this instance. /// - /// The string representation of the value of this instance. + /// A that represents this instance. public override string ToString() { - Vector4 num = this; - return num.ToString(CultureInfo.CurrentCulture); + return ToVector4().ToString(); } /// diff --git a/Source/Engine/Core/Math/FloatR11G11B10.cs b/Source/Engine/Core/Math/FloatR11G11B10.cs index e173a67c9..8fe0d03b0 100644 --- a/Source/Engine/Core/Math/FloatR11G11B10.cs +++ b/Source/Engine/Core/Math/FloatR11G11B10.cs @@ -1,7 +1,6 @@ // Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. using System; -using System.Globalization; using System.Runtime.InteropServices; namespace FlaxEngine @@ -96,13 +95,12 @@ namespace FlaxEngine } /// - /// Converts the value of the object to its equivalent string representation. + /// Returns a that represents this instance. /// - /// The string representation of the value of this instance. + /// A that represents this instance. public override string ToString() { - Vector3 num = this; - return num.ToString(CultureInfo.CurrentCulture); + return ((Vector3)this).ToString(); } /// @@ -119,9 +117,7 @@ namespace FlaxEngine /// /// /// - /// - /// true if is the same instance as or - /// if both are null references or if value1.Equals(value2) returns true; otherwise, false. + /// true if is the same instance as or if both are null references or if value1.Equals(value2) returns true; otherwise, false. public static bool Equals(ref FloatR11G11B10 value1, ref FloatR11G11B10 value2) { return value1.value == value2.value; @@ -145,9 +141,7 @@ namespace FlaxEngine public override bool Equals(object obj) { if (obj == null || obj.GetType() != GetType()) - { return false; - } var v = (FloatR11G11B10)obj; return v.value == value; } diff --git a/Source/Engine/Core/Math/Half2.cs b/Source/Engine/Core/Math/Half2.cs index 5d4f031e0..854662b59 100644 --- a/Source/Engine/Core/Math/Half2.cs +++ b/Source/Engine/Core/Math/Half2.cs @@ -168,6 +168,15 @@ namespace FlaxEngine return Equals((Half2)obj); } + /// + /// Returns a that represents this instance. + /// + /// A that represents this instance. + public override string ToString() + { + return ((Vector2)this).ToString(); + } + /// /// Performs an explicit conversion from to . /// diff --git a/Source/Engine/Core/Math/Half3.cs b/Source/Engine/Core/Math/Half3.cs index caa4011f5..45fc37ee3 100644 --- a/Source/Engine/Core/Math/Half3.cs +++ b/Source/Engine/Core/Math/Half3.cs @@ -200,5 +200,14 @@ namespace FlaxEngine } return Equals((Half3)obj); } + + /// + /// Returns a that represents this instance. + /// + /// A that represents this instance. + public override string ToString() + { + return ((Vector3)this).ToString(); + } } } diff --git a/Source/Engine/Core/Math/Half4.cs b/Source/Engine/Core/Math/Half4.cs index 6ce806021..a3e8fb8a7 100644 --- a/Source/Engine/Core/Math/Half4.cs +++ b/Source/Engine/Core/Math/Half4.cs @@ -185,5 +185,14 @@ namespace FlaxEngine } return Equals((Half4)obj); } + + /// + /// Returns a that represents this instance. + /// + /// A that represents this instance. + public override string ToString() + { + return ((Vector4)this).ToString(); + } } }