From bbe4147cb8e77b354c5ef1a97033f33ff850f87e Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Sun, 8 Oct 2023 13:19:06 +0100 Subject: [PATCH] dotnet-format --- Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs | 6 +++--- Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs | 10 +++++----- Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs | 8 ++++---- Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs | 10 +++++----- Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs b/Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs index ffb732af0f..eb55416d7c 100644 --- a/Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs +++ b/Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs @@ -184,9 +184,9 @@ public static Color HsvToRgb(Vector3 hsv) => Color.HSVToRGB( [LuaDocsDescription("The color yellow")] public static Color yellow => Color.yellow; - + // Operators - + public static Color operator +(ColorApiWrapper a, ColorApiWrapper b) => a._Color + b._Color; public static Color operator -(ColorApiWrapper a, ColorApiWrapper b) => a._Color - b._Color; public static Color operator *(ColorApiWrapper a, ColorApiWrapper b) => a._Color * b._Color; @@ -245,7 +245,7 @@ public static Color HsvToRgb(Vector3 hsv) => Color.HSVToRGB( [LuaDocsParameter("other", "The color to compare")] [LuaDocsReturnValue("true if this color is equal to the specified color; otherwise, false")] public bool Equals(ColorApiWrapper other) => Equals(other._Color); - + public override bool Equals(Object obj) { var other = obj as ColorApiWrapper; diff --git a/Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs b/Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs index 4406b5960e..36e47762db 100644 --- a/Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs +++ b/Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs @@ -251,9 +251,9 @@ public Quaternion SetLookRotation(Vector3 view, Vector3 up) public static Quaternion SlerpUnclamped(Quaternion a, Quaternion b, float t) => Quaternion.SlerpUnclamped(a, b, t); // Operators - + public static Quaternion operator *(RotationApiWrapper a, RotationApiWrapper b) => a._Quaternion * b._Quaternion; - + [LuaDocsDescription(@"Combines two rotations")] [LuaDocsExample(@"result = myRotation:Multiply(anotherRotation)")] [LuaDocsParameter("other", "The other rotation")] @@ -265,13 +265,13 @@ public Quaternion SetLookRotation(Vector3 view, Vector3 up) [LuaDocsParameter("other", "The rotation to comapre to")] [LuaDocsReturnValue(@"True if they are the same as each other")] public bool Equals(RotationApiWrapper other) => Equals(other._Quaternion); - + [LuaDocsDescription("Determines whether this rotation is not equal to the specified rotation")] [LuaDocsExample("if myRotation:NotEquals(rot2) then print(\"rotations are different\") end")] [LuaDocsParameter("other", "The rotation to compare")] [LuaDocsReturnValue("true if this rotation is not equal to the specified rotation; otherwise, false")] public bool NotEquals(RotationApiWrapper other) => !Equals(other); - + [LuaDocsDescription("Determines whether this rotation is equal to the specified xyz values")] [LuaDocsExample("if myRotation:Equals(0, 90, 0) then print(\"90 degree turn to the right\") end")] [LuaDocsParameter("x", "The x value to compare")] @@ -279,7 +279,7 @@ public Quaternion SetLookRotation(Vector3 view, Vector3 up) [LuaDocsParameter("z", "The z value to compare")] [LuaDocsReturnValue("true if this rotation is equal to the specified xyz values; otherwise, false")] public bool Equals(float x, float y, float z) => _Quaternion == Quaternion.Euler(x, y, z); - + public override bool Equals(System.Object obj) { var other = obj as RotationApiWrapper; diff --git a/Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs b/Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs index d0312dfd06..52a57f60e4 100644 --- a/Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs +++ b/Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs @@ -185,19 +185,19 @@ public float scale public static TrTransform identity => TrTransform.identity; // Operators - + public static TrTransform operator *(TransformApiWrapper a, TransformApiWrapper b) => a._TrTransform * b._TrTransform; - + [LuaDocsDescription(@"Combines another transform with this one (Does the same as ""TransformBy"")")] [LuaDocsExample("newTransform = myTransform:Multiply(Transform.up)")] [LuaDocsParameter("other", "The Transform to apply to this one")] public TrTransform Multiply(TrTransform other) => _TrTransform * other; - + [LuaDocsDescription("Is this transform equal to another?")] [LuaDocsExample(@"if myTransform:Equals(Transform.up) then print(""Equal to Transform.up"")")] [LuaDocsParameter("other", "The Transform to compare to this one")] public bool Equals(TransformApiWrapper other) => Equals(other._TrTransform); - + public override bool Equals(System.Object obj) { var other = obj as TransformApiWrapper; diff --git a/Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs b/Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs index 7e188fbee0..b1be037094 100644 --- a/Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs +++ b/Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs @@ -203,7 +203,7 @@ public static Vector2 PointOnCircle(float degrees) public static Vector2 zero => Vector2.zero; // Operators - + public static Vector2 operator +(Vector2ApiWrapper a, Vector2ApiWrapper b) => a._Vector2 + b._Vector2; public static Vector2 operator -(Vector2ApiWrapper a, Vector2ApiWrapper b) => a._Vector2 - b._Vector2; public static Vector2 operator *(Vector2ApiWrapper a, float b) => a._Vector2 * b; @@ -220,13 +220,13 @@ public static Vector2 PointOnCircle(float degrees) [LuaDocsParameter("x", "The x value")] [LuaDocsParameter("y", "The y value")] public Vector2 Add(float x, float y) => _Vector2 + new Vector2(x, y); - + [LuaDocsDescription("Subtracts another vector from this one")] [LuaDocsExample("result = myVector:Subtract(otherVector)")] [LuaDocsParameter("other", "The other vector")] public Vector2 Subtract(Vector2 other) => _Vector2 - other; - + [LuaDocsDescription("Subtracts the given x and y values from this vector")] [LuaDocsExample("result = myVector:Subtract(2, 3)")] [LuaDocsParameter("x", "The x value")] @@ -258,7 +258,7 @@ public static Vector2 PointOnCircle(float degrees) [LuaDocsExample(@"if myVector:Equals(Vector2.zero) then print(""Vector is zero"") end")] [LuaDocsParameter("other", "The other vector")] public bool Equals(Vector2ApiWrapper other) => Equals(other._Vector2); - + public override bool Equals(System.Object obj) { var other = obj as Vector2ApiWrapper; @@ -282,7 +282,7 @@ public override bool Equals(System.Object obj) [LuaDocsParameter("x", "The x value")] [LuaDocsParameter("y", "The y value")] public bool NotEquals(float x, float y) => _Vector2 != new Vector2(x, y); - + } } diff --git a/Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs b/Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs index d7fcc9891f..18549ea60e 100644 --- a/Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs +++ b/Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs @@ -223,12 +223,12 @@ public Vector3 RotateTowards(Vector3 target, float maxRadiansDelta, float maxMag public static Vector3 zero => Vector3.zero; // Operators - + public static Vector3 operator +(Vector3ApiWrapper a, Vector3ApiWrapper b) => a._Vector3 + b._Vector3; public static Vector3 operator -(Vector3ApiWrapper a, Vector3ApiWrapper b) => a._Vector3 - b._Vector3; public static Vector3 operator *(Vector3ApiWrapper a, float b) => a._Vector3 * b; public static Vector3 operator /(Vector3ApiWrapper a, float b) => a._Vector3 / b; - + [LuaDocsDescription("Adds two vectors")] [LuaDocsExample("result = myVector:Add(secondVector)")] [LuaDocsParameter("other", "The other vector")] @@ -274,7 +274,7 @@ public Vector3 RotateTowards(Vector3 target, float maxRadiansDelta, float maxMag [LuaDocsExample(@"if myVector:Equals(Vector3.zero) then print(""Vector is zero"") end")] [LuaDocsParameter("other", "The other vector")] public bool Equals(Vector3ApiWrapper other) => Equals(other._Vector3); - + public override bool Equals(System.Object obj) { var other = obj as Vector3ApiWrapper;