Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
VRage.MyFixedPoint Struct Reference

Fixed point number represented as 64-bit integer with 6 decimal places (one millionts) More...

Inheritance diagram for VRage.MyFixedPoint:

Public Member Functions

string SerializeString ()
 For XmlSerialization, format is 123.456789 More...
 
int ToIntSafe ()
 
override string ToString ()
 
override int GetHashCode ()
 
override bool Equals (object obj)
 
XmlSchema IXmlSerializable. GetSchema ()
 
void IXmlSerializable. ReadXml (XmlReader reader)
 
void IXmlSerializable. WriteXml (XmlWriter writer)
 

Static Public Member Functions

static MyFixedPoint DeserializeStringSafe (string text)
 For XmlSerialization, format is 123.456789 Handles double and decimal formats too. More...
 
static MyFixedPoint DeserializeString (string text)
 
static operator MyFixedPoint (float d)
 
static operator MyFixedPoint (double d)
 
static operator MyFixedPoint (decimal d)
 
static implicit operator MyFixedPoint (int i)
 
static operator decimal (MyFixedPoint fp)
 
static operator float (MyFixedPoint fp)
 
static operator double (MyFixedPoint fp)
 
static operator int (MyFixedPoint fp)
 
static bool IsIntegral (MyFixedPoint fp)
 
static MyFixedPoint Ceiling (MyFixedPoint a)
 
static MyFixedPoint Floor (MyFixedPoint a)
 
static MyFixedPoint Min (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint Max (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint Round (MyFixedPoint a)
 
static MyFixedPoint operator- (MyFixedPoint a)
 
static bool operator< (MyFixedPoint a, MyFixedPoint b)
 
static bool operator> (MyFixedPoint a, MyFixedPoint b)
 
static bool operator<= (MyFixedPoint a, MyFixedPoint b)
 
static bool operator>= (MyFixedPoint a, MyFixedPoint b)
 
static bool operator== (MyFixedPoint a, MyFixedPoint b)
 
static bool operator!= (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint operator+ (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint operator- (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint operator* (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint operator* (MyFixedPoint a, float b)
 
static MyFixedPoint operator* (float a, MyFixedPoint b)
 
static MyFixedPoint operator* (MyFixedPoint a, int b)
 
static MyFixedPoint operator* (int a, MyFixedPoint b)
 
static MyFixedPoint AddSafe (MyFixedPoint a, MyFixedPoint b)
 
static MyFixedPoint MultiplySafe (MyFixedPoint a, float b)
 
static MyFixedPoint MultiplySafe (MyFixedPoint a, int b)
 
static MyFixedPoint MultiplySafe (float a, MyFixedPoint b)
 
static MyFixedPoint MultiplySafe (int a, MyFixedPoint b)
 
static MyFixedPoint MultiplySafe (MyFixedPoint a, MyFixedPoint b)
 

Public Attributes

const int Places = 6
 
const int Divider = 1000000
 
long RawValue
 

Static Public Attributes

static readonly string FormatSpecifier = "D" + (Places + 1)
 
static readonly char[] TrimChars = new char[] { '0' }
 
static readonly MyFixedPoint MinValue = new MyFixedPoint(long.MinValue)
 
static readonly MyFixedPoint MaxValue = new MyFixedPoint(long.MaxValue)
 
static readonly MyFixedPoint Zero = new MyFixedPoint(0L)
 
static readonly MyFixedPoint SmallestPossibleValue = new MyFixedPoint(1)
 
static readonly MyFixedPoint MaxIntValue = (MyFixedPoint)int.MaxValue
 
static readonly MyFixedPoint MinIntValue = (MyFixedPoint)int.MinValue
 

Detailed Description

Fixed point number represented as 64-bit integer with 6 decimal places (one millionts)

Definition at line 22 of file MyFixedPoint.cs.

Member Function Documentation

static MyFixedPoint VRage.MyFixedPoint.AddSafe ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 265 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.Ceiling ( MyFixedPoint  a)
inlinestatic

Definition at line 160 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.DeserializeString ( string  text)
inlinestatic

Definition at line 91 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.DeserializeStringSafe ( string  text)
inlinestatic

For XmlSerialization, format is 123.456789 Handles double and decimal formats too.

Definition at line 65 of file MyFixedPoint.cs.

override bool VRage.MyFixedPoint.Equals ( object  obj)
inline

Definition at line 342 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.Floor ( MyFixedPoint  a)
inlinestatic

Definition at line 166 of file MyFixedPoint.cs.

override int VRage.MyFixedPoint.GetHashCode ( )
inline

Definition at line 337 of file MyFixedPoint.cs.

XmlSchema IXmlSerializable. VRage.MyFixedPoint.GetSchema ( )
inline

Definition at line 354 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.IsIntegral ( MyFixedPoint  fp)
inlinestatic

Definition at line 155 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.Max ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 177 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.Min ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 172 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.MultiplySafe ( MyFixedPoint  a,
float  b 
)
inlinestatic

Definition at line 270 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.MultiplySafe ( MyFixedPoint  a,
int  b 
)
inlinestatic

Definition at line 275 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.MultiplySafe ( float  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 280 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.MultiplySafe ( int  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 285 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.MultiplySafe ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 290 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator decimal ( MyFixedPoint  fp)
inlineexplicitstatic

Definition at line 135 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator double ( MyFixedPoint  fp)
inlineexplicitstatic

Definition at line 145 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator float ( MyFixedPoint  fp)
inlineexplicitstatic

Definition at line 140 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator int ( MyFixedPoint  fp)
inlineexplicitstatic

Definition at line 150 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator MyFixedPoint ( float  d)
inlineexplicitstatic

Definition at line 111 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator MyFixedPoint ( double  d)
inlineexplicitstatic

Definition at line 118 of file MyFixedPoint.cs.

static VRage.MyFixedPoint.operator MyFixedPoint ( decimal  d)
inlineexplicitstatic

Definition at line 125 of file MyFixedPoint.cs.

static implicit VRage.MyFixedPoint.operator MyFixedPoint ( int  i)
inlinestatic

Definition at line 130 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator!= ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 218 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator* ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 235 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator* ( MyFixedPoint  a,
float  b 
)
inlinestatic

Definition at line 245 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator* ( float  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 250 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator* ( MyFixedPoint  a,
int  b 
)
inlinestatic

Definition at line 255 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator* ( int  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 260 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator+ ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 223 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator- ( MyFixedPoint  a)
inlinestatic

Definition at line 188 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.operator- ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 229 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator< ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 193 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator<= ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 203 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator== ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 213 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator> ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 198 of file MyFixedPoint.cs.

static bool VRage.MyFixedPoint.operator>= ( MyFixedPoint  a,
MyFixedPoint  b 
)
inlinestatic

Definition at line 208 of file MyFixedPoint.cs.

void IXmlSerializable. VRage.MyFixedPoint.ReadXml ( XmlReader  reader)
inline

Definition at line 359 of file MyFixedPoint.cs.

static MyFixedPoint VRage.MyFixedPoint.Round ( MyFixedPoint  a)
inlinestatic

Definition at line 182 of file MyFixedPoint.cs.

string VRage.MyFixedPoint.SerializeString ( )
inline

For XmlSerialization, format is 123.456789

Definition at line 50 of file MyFixedPoint.cs.

int VRage.MyFixedPoint.ToIntSafe ( )
inline

Definition at line 325 of file MyFixedPoint.cs.

override string VRage.MyFixedPoint.ToString ( )
inline

Definition at line 332 of file MyFixedPoint.cs.

void IXmlSerializable. VRage.MyFixedPoint.WriteXml ( XmlWriter  writer)
inline

Definition at line 365 of file MyFixedPoint.cs.

Member Data Documentation

const int VRage.MyFixedPoint.Divider = 1000000

Definition at line 28 of file MyFixedPoint.cs.

readonly string VRage.MyFixedPoint.FormatSpecifier = "D" + (Places + 1)
static

Definition at line 29 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.MaxIntValue = (MyFixedPoint)int.MaxValue
static

Definition at line 36 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.MaxValue = new MyFixedPoint(long.MaxValue)
static

Definition at line 33 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.MinIntValue = (MyFixedPoint)int.MinValue
static

Definition at line 37 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.MinValue = new MyFixedPoint(long.MinValue)
static

Definition at line 32 of file MyFixedPoint.cs.

const int VRage.MyFixedPoint.Places = 6

Definition at line 27 of file MyFixedPoint.cs.

long VRage.MyFixedPoint.RawValue

Definition at line 40 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.SmallestPossibleValue = new MyFixedPoint(1)
static

Definition at line 35 of file MyFixedPoint.cs.

readonly char [] VRage.MyFixedPoint.TrimChars = new char[] { '0' }
static

Definition at line 30 of file MyFixedPoint.cs.

readonly MyFixedPoint VRage.MyFixedPoint.Zero = new MyFixedPoint(0L)
static

Definition at line 34 of file MyFixedPoint.cs.


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