Struct FixedPoint64
Represents a signed 32.32 fixed-point number.
public readonly struct FixedPoint64 : IEquatable<FixedPoint64>
- Implements
- Inherited Members
Constructors
FixedPoint64(double)
Converts a double-precision value to 32.32 fixed point.
public FixedPoint64(double val)
Parameters
valdoubleThe value to convert.
FixedPoint64(long)
Represents a signed 32.32 fixed-point number.
public FixedPoint64(long _rawValue)
Parameters
_rawValuelongThe raw fixed-point representation.
Properties
RawValue
Gets the raw 32.32 representation.
public long RawValue { get; }
Property Value
Value
Gets the represented double-precision value.
public double Value { get; }
Property Value
Methods
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(FixedPoint64)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FixedPoint64 other)
Parameters
otherFixedPoint64An object to compare with this object.
Returns
FromJsonString(string)
Deserializes a raw 32.32 fixed-point value from JSON.
public static FixedPoint64 FromJsonString(string jsonString)
Parameters
jsonStringstringThe JSON number to deserialize.
Returns
- FixedPoint64
The deserialized value.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToJsonString()
Serializes the raw fixed-point value to JSON.
public string ToJsonString()
Returns
- string
The serialized raw value.
ToString()
Formats the represented value using the invariant culture.
public override string ToString()
Returns
- string
The decimal representation.
Operators
operator ==(FixedPoint64, FixedPoint64)
Determines whether two fixed-point values are equal.
public static bool operator ==(FixedPoint64 lhs, FixedPoint64 rhs)
Parameters
lhsFixedPoint64rhsFixedPoint64
Returns
operator !=(FixedPoint64, FixedPoint64)
Determines whether two fixed-point values are not equal.
public static bool operator !=(FixedPoint64 lhs, FixedPoint64 rhs)
Parameters
lhsFixedPoint64rhsFixedPoint64