2013-06-02 14:32:43 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Double.h *
|
|
|
|
* *
|
2013-07-12 21:30:13 +02:00
|
|
|
* XFX System::Double structure definition file *
|
2013-06-02 14:32:43 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _SYSTEM_DOUBLE_
|
|
|
|
#define _SYSTEM_DOUBLE_
|
|
|
|
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
class String;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Represents a double precision floating point value.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct Double : IComparable<Double>, IEquatable<Double>, Object
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
double value;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static const double Epsilon;
|
|
|
|
static const double MaxValue;
|
|
|
|
static const double MinValue;
|
|
|
|
static const double NaN;
|
|
|
|
static const double NegativeInfinity;
|
|
|
|
static const double PositiveInfinity;
|
|
|
|
|
|
|
|
Double(const double &obj);
|
|
|
|
Double(const Double &obj);
|
|
|
|
|
|
|
|
int CompareTo(const Double other) const;
|
|
|
|
bool Equals(const Double other) const;
|
|
|
|
int GetHashCode() const;
|
2013-10-09 11:52:41 +02:00
|
|
|
static bool IsNaN(const Double& d);
|
|
|
|
static bool IsNegativeInfinity(const Double& d);
|
|
|
|
static bool IsPositiveInfinity(const Double& d);
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-07-11 20:00:07 +02:00
|
|
|
const String ToString() const;
|
|
|
|
static const String ToString(const double value);
|
2013-05-05 18:18:41 +02:00
|
|
|
static bool TryParse(const String& str, out double* result);
|
|
|
|
|
|
|
|
operator double() const;
|
|
|
|
bool operator !=(const Double& right) const;
|
|
|
|
bool operator ==(const Double& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_SYSTEM_DOUBLE_
|