Facings operators

This commit is contained in:
Maddy Thorson 2021-02-11 22:50:20 -08:00
parent c546c69434
commit d9c75b1e0d

View File

@ -1,3 +1,4 @@
using System;
namespace Strawberry namespace Strawberry
{ {
public enum Facings public enum Facings
@ -21,6 +22,18 @@ namespace Strawberry
return i; return i;
} }
[Inline, Commutable]
static public int operator*(Facings a, int b)
{
return b * (int)a;
}
[Inline, Commutable]
static public float operator*(Facings a, float b)
{
return b * (int)a;
}
static public implicit operator Facings(int i) static public implicit operator Facings(int i)
{ {
if (i < 0) if (i < 0)