From b65d4e391cd782c8c62fb43cc0ee88738c848239 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Mon, 12 Jun 2023 09:53:44 -0700 Subject: [PATCH] public Fix64 RawValue --- src/Math/Fixed/Fix64.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Math/Fixed/Fix64.cs b/src/Math/Fixed/Fix64.cs index 808cefbf..047ec2e4 100644 --- a/src/Math/Fixed/Fix64.cs +++ b/src/Math/Fixed/Fix64.cs @@ -7,7 +7,7 @@ namespace MoonWorks.Math.Fixed { public struct Fix64 : IEquatable, IComparable { - private readonly long RawValue; + public long RawValue { get; } const long MAX_VALUE = long.MaxValue; const long MIN_VALUE = long.MinValue; @@ -52,6 +52,11 @@ namespace MoonWorks.Math.Fixed return new Fix64(numerator) / new Fix64(denominator); } + public static Fix64 FromRawValue(long value) + { + return new Fix64(value); + } + /// /// Gets the fractional component of this Fix64 value. ///