1 #ifndef __MONO_DECIMAL_MS_H__
2 #define __MONO_DECIMAL_MS_H__
5 // Decimal.cs treats the first two shorts as one long
6 // And they seriable the data so we need to little endian
8 // The wReserved overlaps with Variant's vt member
9 #if G_BYTE_ORDER != G_LITTLE_ENDIAN
39 MONO_DECIMAL_CMP_LT
=-1,
42 } MonoDecimalCompareResult
;
44 MonoDecimalCompareResult
45 mono_decimal_compare (MonoDecimal
*left
, MonoDecimal
*right
);
47 void mono_decimal_init_single (MonoDecimal
*_this
, float value
);
48 void mono_decimal_init_double (MonoDecimal
*_this
, double value
);
49 void mono_decimal_floor (MonoDecimal
*d
);
50 int32_t mono_decimal_get_hash_code (MonoDecimal
*d
);
51 void mono_decimal_multiply (MonoDecimal
*d1
, MonoDecimal
*d2
);
52 void mono_decimal_round (MonoDecimal
*d
, int32_t decimals
);
53 void mono_decimal_tocurrency (MonoDecimal
*decimal
);
54 double mono_decimal_to_double (MonoDecimal d
);
55 int32_t mono_decimal_to_int32 (MonoDecimal d
);
56 float mono_decimal_to_float (MonoDecimal d
);
57 void mono_decimal_truncate (MonoDecimal
*d
);
58 void mono_decimal_addsub (MonoDecimal
*left
, MonoDecimal
*right
, uint8_t sign
);
59 void mono_decimal_divide (MonoDecimal
*left
, MonoDecimal
*right
);
60 int mono_decimal_from_number (void *from
, MonoDecimal
*target
);