Skip to content

Commit

Permalink
dotnet-format
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Oct 8, 2023
1 parent 6cabf25 commit bbe4147
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Assets/Scripts/API/Lua/Wrappers/ColorApiWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions Assets/Scripts/API/Lua/Wrappers/RotationApiWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -265,21 +265,21 @@ 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")]
[LuaDocsParameter("y", "The y value to compare")]
[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;
Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/API/Lua/Wrappers/TransformApiWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions Assets/Scripts/API/Lua/Wrappers/Vector2ApiWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")]
Expand Down Expand Up @@ -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;
Expand All @@ -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);

}

}
6 changes: 3 additions & 3 deletions Assets/Scripts/API/Lua/Wrappers/Vector3ApiWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bbe4147

Please sign in to comment.