2013-05-05 18:18:41 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Single.h *
|
|
|
|
* *
|
2013-06-02 14:32:43 +02:00
|
|
|
* XFX System::Single structure definition file *
|
2013-05-05 18:18:41 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef _SYSTEM_SINGLE_
|
|
|
|
#define _SYSTEM_SINGLE_
|
|
|
|
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
class String;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Represents a single precision floating point value.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct Single : IComparable<Single>, IEquatable<Single>, Object
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
float value;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static const float Epsilon;
|
|
|
|
static const float MaxValue;
|
|
|
|
static const float MinValue;
|
|
|
|
static const float NaN;
|
|
|
|
static const float NegativeInfinity;
|
|
|
|
static const float PositiveInfinity;
|
|
|
|
|
|
|
|
Single();
|
|
|
|
Single(const Single &obj);
|
|
|
|
Single(const float &obj);
|
|
|
|
|
|
|
|
int CompareTo(const Single other) const;
|
|
|
|
bool Equals(Object const * const obj) const;
|
|
|
|
bool Equals(const Single other) const;
|
|
|
|
int GetHashCode() const;
|
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 float value);
|
2013-05-05 18:18:41 +02:00
|
|
|
static bool TryParse(const String& str, out float* result);
|
|
|
|
|
|
|
|
operator float() const;
|
|
|
|
bool operator !=(const Single& right) const;
|
|
|
|
bool operator ==(const Single& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_SYSTEM_SINGLE_
|