Click or drag to resize

Decimal10x5 Structure

Represents a 16-bit fixed-point decimal consisting of 1 sign bit, 10 integer bits and 5 fractional bits (denoted as Q10.5). Note that the implementation is not reporting over- and underflowing errors.

Namespace:  Syroot.NintenTools.Bfres
Assembly:  Syroot.NintenTools.Bfres (in Syroot.NintenTools.Bfres.dll) Version: 1.5.0
Syntax
C#
public struct Decimal10x5

The Decimal10x5 type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Gets a value indicating whether this Decimal10x5 is the same as the second specified Decimal10x5.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Decimal10x5)
Indicates whether the current Decimal10x5 is equal to another Decimal10x5.
Public methodGetHashCode
Gets a hash code as an indication for object equality.
(Overrides ValueTypeGetHashCode.)
Public methodToString
Gets a string describing this Decimal10x5.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds the first Decimal10x5 to the second one.
Public operatorStatic memberDivision(Decimal10x5, Decimal10x5)
Divides the first Decimal10x5 through the second one.
Public operatorStatic memberDivision(Decimal10x5, Int32)
Divides the given Decimal10x5 through the scalar.
Public operatorStatic memberEquality
Gets a value indicating whether the first specified Decimal10x5 is the same as the second specified Decimal10x5.
Public operatorStatic member(Double to Decimal10x5)
Converts the given value value to a Decimal10x5 instance.
Public operatorStatic member(Int32 to Decimal10x5)
Converts the given value value to a Decimal10x5 instance.
Public operatorStatic member(Single to Decimal10x5)
Converts the given value value to a Decimal10x5 instance.
Public operatorStatic member(Decimal10x5 to Double)
Converts the given value value to a Double instance.
Public operatorStatic member(Decimal10x5 to Int32)
Converts the given value value to a Int32 instance.
Public operatorStatic member(Decimal10x5 to Single)
Converts the given value value to a Single instance.
Public operatorStatic memberInequality
Gets a value indicating whether the first specified Decimal10x5 is not the same as the second specified Decimal10x5.
Public operatorStatic memberMultiply(Decimal10x5, Decimal10x5)
Multiplicates the first Decimal10x5 by the second one.
Public operatorStatic memberMultiply(Decimal10x5, Int32)
Multiplicates the given Decimal10x5 by the scalar.
Public operatorStatic memberSubtraction
Subtracts the first Decimal10x5 from the second one.
Public operatorStatic memberUnaryNegation
Negates the given Decimal10x5.
Public operatorStatic memberUnaryPlus
Returns the given Decimal10x5.
Top
Fields
  NameDescription
Public fieldStatic memberMaxValue
Represents the largest possible value of Decimal10x5.
Public fieldStatic memberMinValue
Represents the smallest possible value of Decimal10x5.
Top
Remarks
Examples: SIIIIIII_IIIFFFFF 0b00000000_00010000 = 0.5 0b00000000_00100000 = 1 0b00000001_00000000 = 8 0b01000000_00000000 = 512 0b10000000_00000000 = -1024
See Also