public Fix64 RawValue

remotes/1695061714407202320/main
cosmonaut 2023-06-12 09:53:44 -07:00
parent 56bab545ba
commit b65d4e391c
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@ namespace MoonWorks.Math.Fixed
{
public struct Fix64 : IEquatable<Fix64>, IComparable<Fix64>
{
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);
}
/// <summary>
/// Gets the fractional component of this Fix64 value.
/// </summary>