Use expression body syntax

This commit is contained in:
teinarss
2021-02-25 20:52:13 +01:00
committed by Paul Chote
parent 555c43843b
commit 4a1e4f3e16
403 changed files with 1342 additions and 2031 deletions

View File

@@ -42,8 +42,8 @@ namespace OpenRA
public CVec Sign() { return new CVec(Math.Sign(X), Math.Sign(Y)); }
public CVec Abs() { return new CVec(Math.Abs(X), Math.Abs(Y)); }
public int LengthSquared { get { return X * X + Y * Y; } }
public int Length { get { return Exts.ISqrt(LengthSquared); } }
public int LengthSquared => X * X + Y * Y;
public int Length => Exts.ISqrt(LengthSquared);
public CVec Clamp(Rectangle r)
{
@@ -114,10 +114,7 @@ namespace OpenRA
}
}
set
{
throw new LuaException("CVec is read-only. Use CVec.New to create a new value");
}
set => throw new LuaException("CVec is read-only. Use CVec.New to create a new value");
}
#endregion