From d9c75b1e0d8e6c4db7a1653ca3a1b073dc8f785f Mon Sep 17 00:00:00 2001 From: Maddy Thorson Date: Thu, 11 Feb 2021 22:50:20 -0800 Subject: [PATCH] Facings operators --- src/Struct/Facings.bf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Struct/Facings.bf b/src/Struct/Facings.bf index 27e0871..a40db87 100644 --- a/src/Struct/Facings.bf +++ b/src/Struct/Facings.bf @@ -1,3 +1,4 @@ +using System; namespace Strawberry { public enum Facings @@ -21,6 +22,18 @@ namespace Strawberry 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) { if (i < 0)