public Fix64 RawValue
parent
56bab545ba
commit
b65d4e391c
|
@ -7,7 +7,7 @@ namespace MoonWorks.Math.Fixed
|
||||||
{
|
{
|
||||||
public struct Fix64 : IEquatable<Fix64>, IComparable<Fix64>
|
public struct Fix64 : IEquatable<Fix64>, IComparable<Fix64>
|
||||||
{
|
{
|
||||||
private readonly long RawValue;
|
public long RawValue { get; }
|
||||||
|
|
||||||
const long MAX_VALUE = long.MaxValue;
|
const long MAX_VALUE = long.MaxValue;
|
||||||
const long MIN_VALUE = long.MinValue;
|
const long MIN_VALUE = long.MinValue;
|
||||||
|
@ -52,6 +52,11 @@ namespace MoonWorks.Math.Fixed
|
||||||
return new Fix64(numerator) / new Fix64(denominator);
|
return new Fix64(numerator) / new Fix64(denominator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Fix64 FromRawValue(long value)
|
||||||
|
{
|
||||||
|
return new Fix64(value);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the fractional component of this Fix64 value.
|
/// Gets the fractional component of this Fix64 value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue