Table of Contents

Struct FixedPoint32

Namespace
TCSystem.MetaData
Assembly
TCSystem.MetaData.dll

Represents a signed 16.16 fixed-point number.

public readonly struct FixedPoint32 : IEquatable<FixedPoint32>
Implements
Inherited Members

Constructors

FixedPoint32(double)

Converts a double-precision value to 16.16 fixed point.

public FixedPoint32(double val)

Parameters

val double

The value to convert.

FixedPoint32(int)

Represents a signed 16.16 fixed-point number.

public FixedPoint32(int _rawValue)

Parameters

_rawValue int

The raw fixed-point representation.

FixedPoint32(float)

Converts a single-precision value to 16.16 fixed point.

public FixedPoint32(float val)

Parameters

val float

The value to convert.

Properties

RawValue

Gets the raw 16.16 representation.

public int RawValue { get; }

Property Value

int

Value

Gets the represented single-precision value.

public float Value { get; }

Property Value

float

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(FixedPoint32)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(FixedPoint32 other)

Parameters

other FixedPoint32

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

FromJsonString(string)

Deserializes a raw 16.16 fixed-point value from JSON.

public static FixedPoint32 FromJsonString(string jsonString)

Parameters

jsonString string

The JSON number to deserialize.

Returns

FixedPoint32

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 ==(FixedPoint32, FixedPoint32)

Determines whether two fixed-point values are equal.

public static bool operator ==(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool

operator >(FixedPoint32, FixedPoint32)

Determines whether the left value is greater than the right value.

public static bool operator >(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool

operator >=(FixedPoint32, FixedPoint32)

Determines whether the left value is greater than or equal to the right value.

public static bool operator >=(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool

operator !=(FixedPoint32, FixedPoint32)

Determines whether two fixed-point values are not equal.

public static bool operator !=(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool

operator <(FixedPoint32, FixedPoint32)

Determines whether the left value is less than the right value.

public static bool operator <(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool

operator <=(FixedPoint32, FixedPoint32)

Determines whether the left value is less than or equal to the right value.

public static bool operator <=(FixedPoint32 lhs, FixedPoint32 rhs)

Parameters

lhs FixedPoint32
rhs FixedPoint32

Returns

bool