Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Decimal Struct Reference

Classes

struct  DecCalc
 

Public Member Functions

 Decimal (int value)
 
 Decimal (uint value)
 
 Decimal (long value)
 
 Decimal (ulong value)
 
 Decimal (float value)
 
 Decimal (double value)
 
void ISerializable. GetObjectData (SerializationInfo info, StreamingContext context)
 
 Decimal (int[] bits)
 
 Decimal (ReadOnlySpan< int > bits)
 
 Decimal (int lo, int mid, int hi, bool isNegative, byte scale)
 
void IDeserializationCallback. OnDeserialization (object sender)
 
int CompareTo (object? value)
 
int CompareTo (decimal value)
 
override bool Equals ([NotNullWhen(true)] object? value)
 
bool Equals (decimal value)
 
override int GetHashCode ()
 
override string ToString ()
 
string ToString (string? format)
 
string ToString (IFormatProvider? provider)
 
string ToString (string? format, IFormatProvider? provider)
 
bool TryFormat (Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >), IFormatProvider? provider=null)
 
TypeCode GetTypeCode ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
object IConvertible. ToType (Type type, IFormatProvider provider)
 
int CompareTo (T? other)
 
bool ToBoolean (IFormatProvider? provider)
 
char ToChar (IFormatProvider? provider)
 
sbyte ToSByte (IFormatProvider? provider)
 
byte ToByte (IFormatProvider? provider)
 
short ToInt16 (IFormatProvider? provider)
 
ushort ToUInt16 (IFormatProvider? provider)
 
int ToInt32 (IFormatProvider? provider)
 
uint ToUInt32 (IFormatProvider? provider)
 
long ToInt64 (IFormatProvider? provider)
 
ulong ToUInt64 (IFormatProvider? provider)
 
float ToSingle (IFormatProvider? provider)
 
double ToDouble (IFormatProvider? provider)
 
decimal ToDecimal (IFormatProvider? provider)
 
DateTime ToDateTime (IFormatProvider? provider)
 
object ToType (Type conversionType, IFormatProvider? provider)
 
int CompareTo (T? other)
 
bool Equals (T? other)
 
void OnDeserialization (object? sender)
 

Static Public Member Functions

static decimal FromOACurrency (long cy)
 
static long ToOACurrency (decimal value)
 
static decimal Add (decimal d1, decimal d2)
 
static decimal Ceiling (decimal d)
 
static int Compare (decimal d1, decimal d2)
 
static decimal Divide (decimal d1, decimal d2)
 
static bool Equals (decimal d1, decimal d2)
 
static decimal Floor (decimal d)
 
static decimal Parse (string s)
 
static decimal Parse (string s, NumberStyles style)
 
static decimal Parse (string s, IFormatProvider? provider)
 
static decimal Parse (string s, NumberStyles style, IFormatProvider? provider)
 
static decimal Parse (ReadOnlySpan< char > s, NumberStyles style=NumberStyles.Number, IFormatProvider? provider=null)
 
static bool TryParse ([NotNullWhen(true)] string? s, out decimal result)
 
static bool TryParse (ReadOnlySpan< char > s, out decimal result)
 
static bool TryParse ([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out decimal result)
 
static bool TryParse (ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out decimal result)
 
static int[] GetBits (decimal d)
 
static int GetBits (decimal d, Span< int > destination)
 
static bool TryGetBits (decimal d, Span< int > destination, out int valuesWritten)
 
static decimal Remainder (decimal d1, decimal d2)
 
static decimal Multiply (decimal d1, decimal d2)
 
static decimal Negate (decimal d)
 
static decimal Round (decimal d)
 
static decimal Round (decimal d, int decimals)
 
static decimal Round (decimal d, MidpointRounding mode)
 
static decimal Round (decimal d, int decimals, MidpointRounding mode)
 
static decimal Subtract (decimal d1, decimal d2)
 
static byte ToByte (decimal value)
 
static sbyte ToSByte (decimal value)
 
static short ToInt16 (decimal value)
 
static double ToDouble (decimal d)
 
static int ToInt32 (decimal d)
 
static long ToInt64 (decimal d)
 
static ushort ToUInt16 (decimal value)
 
static uint ToUInt32 (decimal d)
 
static ulong ToUInt64 (decimal d)
 
static float ToSingle (decimal d)
 
static decimal Truncate (decimal d)
 
static implicit operator decimal (byte value)
 
static implicit operator decimal (sbyte value)
 
static implicit operator decimal (short value)
 
static implicit operator decimal (ushort value)
 
static implicit operator decimal (char value)
 
static implicit operator decimal (int value)
 
static implicit operator decimal (uint value)
 
static implicit operator decimal (long value)
 
static implicit operator decimal (ulong value)
 
static operator decimal (float value)
 
static operator decimal (double value)
 
static operator byte (decimal value)
 
static operator sbyte (decimal value)
 
static operator char (decimal value)
 
static operator short (decimal value)
 
static operator ushort (decimal value)
 
static operator int (decimal value)
 
static operator uint (decimal value)
 
static operator long (decimal value)
 
static operator ulong (decimal value)
 
static operator float (decimal value)
 
static operator double (decimal value)
 
static decimal operator+ (decimal d)
 
static decimal operator- (decimal d)
 
static decimal operator++ (decimal d)
 
static decimal operator-- (decimal d)
 
static decimal operator+ (decimal d1, decimal d2)
 
static decimal operator- (decimal d1, decimal d2)
 
static decimal operator* (decimal d1, decimal d2)
 
static decimal operator/ (decimal d1, decimal d2)
 
static decimal operator% (decimal d1, decimal d2)
 
static bool operator== (decimal d1, decimal d2)
 
static bool operator!= (decimal d1, decimal d2)
 
static bool operator< (decimal d1, decimal d2)
 
static bool operator<= (decimal d1, decimal d2)
 
static bool operator> (decimal d1, decimal d2)
 
static bool operator>= (decimal d1, decimal d2)
 
static decimal IAdditionOperators< decimal, decimal, decimal >. operator+ (decimal left, decimal right)
 
static bool IComparisonOperators< decimal, decimal >. operator< (decimal left, decimal right)
 
static bool IComparisonOperators< decimal, decimal >. operator<= (decimal left, decimal right)
 
static bool IComparisonOperators< decimal, decimal >. operator> (decimal left, decimal right)
 
static bool IComparisonOperators< decimal, decimal >. operator>= (decimal left, decimal right)
 
static decimal IDecrementOperators< decimal >. operator-- (decimal value)
 
static decimal IDivisionOperators< decimal, decimal, decimal >. operator/ (decimal left, decimal right)
 
static bool IEqualityOperators< decimal, decimal >. operator== (decimal left, decimal right)
 
static bool IEqualityOperators< decimal, decimal >. operator!= (decimal left, decimal right)
 
static decimal IIncrementOperators< decimal >. operator++ (decimal value)
 
static decimal IModulusOperators< decimal, decimal, decimal >. operator% (decimal left, decimal right)
 
static decimal IMultiplyOperators< decimal, decimal, decimal >. operator* (decimal left, decimal right)
 
static decimal INumber< decimal >. Abs (decimal value)
 
static decimal INumber< decimal >. Create< TOther > (TOther value)
 
static decimal INumber< decimal >. CreateSaturating< TOther > (TOther value)
 
static decimal INumber< decimal >. CreateTruncating< TOther > (TOther value)
 
static decimal INumber< decimal >. Clamp (decimal value, decimal min, decimal max)
 
static decimal decimal Remainder INumber< decimal >. DivRem (decimal left, decimal right)
 
static decimal INumber< decimal >. Max (decimal x, decimal y)
 
static decimal INumber< decimal >. Min (decimal x, decimal y)
 
static decimal INumber< decimal >. Parse (string s, NumberStyles style, IFormatProvider provider)
 
static decimal INumber< decimal >. Parse (ReadOnlySpan< char > s, NumberStyles style, IFormatProvider provider)
 
static decimal INumber< decimal >. Sign (decimal value)
 
static bool INumber< decimal >. TryCreate< TOther > (TOther value, out decimal result)
 
static bool INumber< decimal >. TryParse ([NotNullWhen(true)] string s, NumberStyles style, IFormatProvider provider, out decimal result)
 
static bool INumber< decimal >. TryParse (ReadOnlySpan< char > s, NumberStyles style, IFormatProvider provider, out decimal result)
 
static decimal IParseable< decimal >. Parse (string s, IFormatProvider provider)
 
static bool IParseable< decimal >. TryParse ([NotNullWhen(true)] string s, IFormatProvider provider, out decimal result)
 
static decimal ISpanParseable< decimal >. Parse (ReadOnlySpan< char > s, IFormatProvider provider)
 
static bool ISpanParseable< decimal >. TryParse (ReadOnlySpan< char > s, IFormatProvider provider, out decimal result)
 
static decimal ISubtractionOperators< decimal, decimal, decimal >. operator- (decimal left, decimal right)
 
static decimal IUnaryNegationOperators< decimal, decimal >. operator- (decimal value)
 
static decimal IUnaryPlusOperators< decimal, decimal >. operator+ (decimal value)
 
static TSelf Abs (TSelf value)
 
static TSelf Clamp (TSelf value, TSelf min, TSelf max)
 
static TSelf TSelf Remainder DivRem (TSelf left, TSelf right)
 
static TSelf Max (TSelf x, TSelf y)
 
static TSelf Min (TSelf x, TSelf y)
 
static TSelf Parse (string s, NumberStyles style, IFormatProvider? provider)
 
static TSelf Parse (ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider)
 
static TSelf Sign (TSelf value)
 
static bool TryCreate< TOther > (TOther value, out TSelf result)
 
static bool TryParse ([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result)
 
static bool TryParse (ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out TSelf result)
 
static TResult operator+ (TSelf left, TOther right)
 
static bool operator< (TSelf left, TOther right)
 
static bool operator<= (TSelf left, TOther right)
 
static bool operator> (TSelf left, TOther right)
 
static bool operator>= (TSelf left, TOther right)
 
static bool operator== (TSelf left, TOther right)
 
static bool operator!= (TSelf left, TOther right)
 
static TSelf operator-- (TSelf value)
 
static TResult operator/ (TSelf left, TOther right)
 
static TSelf operator++ (TSelf value)
 
static TResult operator% (TSelf left, TOther right)
 
static TResult operator* (TSelf left, TOther right)
 
static TSelf Parse (ReadOnlySpan< char > s, IFormatProvider? provider)
 
static bool TryParse (ReadOnlySpan< char > s, IFormatProvider? provider, out TSelf result)
 
static bool TryParse ([NotNullWhen(true)] string? s, IFormatProvider? provider, out TSelf result)
 
static TResult operator- (TSelf left, TOther right)
 
static TResult operator- (TSelf value)
 
static TResult operator+ (TSelf value)
 

Static Public Attributes

const decimal Zero = 0m
 
const decimal One = 1m
 
const decimal MinusOne = -1m
 
const decimal MaxValue = 79228162514264337593543950335m
 
const decimal MinValue = -79228162514264337593543950335m
 
static decimal Quotient
 

Package Functions

 Decimal (Currency value)
 

Static Package Functions

static decimal Abs (in decimal d)
 
static void GetBytes (in decimal d, Span< byte > buffer)
 
static decimal ToDecimal (ReadOnlySpan< byte > span)
 
static ref readonly decimal Max (in decimal d1, in decimal d2)
 
static ref readonly decimal Min (in decimal d1, in decimal d2)
 
static int Sign (in decimal d)
 
static uint DecDivMod1E9 (ref decimal value)
 

Properties

static decimal IAdditiveIdentity< decimal, decimal >. AdditiveIdentity [get]
 
static decimal IMinMaxValue< decimal >. MinValue [get]
 
static decimal IMinMaxValue< decimal >. MaxValue [get]
 
static decimal IMultiplicativeIdentity< decimal, decimal >. MultiplicativeIdentity [get]
 
static decimal INumber< decimal >. One [get]
 
static decimal INumber< decimal >. Zero [get]
 
static decimal ISignedNumber< decimal >. NegativeOne [get]
 
uint High [get]
 
uint Low [get]
 
uint Mid [get]
 
bool IsNegative [get]
 
int Scale [get]
 
ulong Low64 [get]
 

Private Member Functions

 Decimal (SerializationInfo info, StreamingContext context)
 
 Decimal (int lo, int mid, int hi, int flags)
 
 Decimal (in decimal d, int flags)
 

Static Private Member Functions

static bool IsValid (int flags)
 
static decimal Round (ref decimal d, int decimals, MidpointRounding mode)
 
static void Truncate (ref decimal d)
 
static ref DecCalc AsMutable (ref decimal d)
 

Private Attributes

readonly int _flags
 
readonly uint _hi32
 
readonly ulong _lo64
 

Detailed Description

Definition at line 17 of file Decimal.cs.


The documentation for this struct was generated from the following file: