xtd - Reference Guide 0.2.0
xtd::box_floating_point< type_t > Class Template Reference

#include <box.h>

Definition

template<typename type_t>
class xtd::box_floating_point< type_t >

Represents a boxed floating point object.

class box_floating_point : public xtd::box<type_t>
Inheritance
xtd::objectxtd::box <type_t> → xtd::box_integer <type_t> → box_floating_point <type_t>
Namespace
xtd
Library
xtd.core
Remarks
You can use xtd::box to represent a class or structure that does not inherit from xtd::object. Typically used for integral types.
Use xtd::boxing to box an object.
Use xtd::unboxing to unbox an object.

Static Public Attributes

static constexpr type_t epsilon = __get_epsilon(type_t{})
 Represents the smallest positive type_t value greater than zero. This field is constant. More...
 
static constexpr type_t infinity = std::numeric_limits<type_t>::infinity()
 Represents infinity. This field is constant. More...
 
static constexpr type_t NaN = std::numeric_limits<type_t>::quiet_NaN()
 Represents not a number (NaN). This field is constant. More...
 
static constexpr type_t negative_infinity = -infinity
 Represents negative infinity. This field is constant. More...
 
static constexpr type_t positive_infinity = +infinity
 Represents positive infinity. This field is constant. More...
 
- Static Public Attributes inherited from xtd::box_integer< type_t >
static constexpr type_t max_value = std::numeric_limits<type_t>::max()
 Represents the largest possible value of type_t. This field is constant. More...
 
static constexpr type_t min_value = std::numeric_limits<type_t>::lowest()
 Represents the smallest possible value of type_t. This field is constant. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::box< type_t >
 box ()=default
 Initialize a new xtd::box object. More...
 
 box (const type_t &value)
 Initialize a new xtd::box object with specified value. More...
 
const type_t & value () const
 Gets the underlying value. More...
 
type_t & value ()
 Gets the underlying value. More...
 
boxvalue (const type_t &value)
 Sets de underlying value. More...
 
 operator type_t () const
 
bool equals (const object &value) const noexcept override
 Determines whether the specified object is equal to the current object. More...
 
bool equals (const box &value) const noexcept override
 Indicates whether the current object is equal to another object of the same type. More...
 
int32_t compare_to (const object &value) const noexcept override
 Compares the current instance with another object of the same type. More...
 
int32_t compare_to (const box &value) const noexcept override
 Compares the current instance with another object of the same type. More...
 
xtd::ustring to_string () const noexcept override
 Returns a sxd::ustring that represents the current object. More...
 
xtd::ustring to_string (const xtd::ustring &format) const noexcept
 Converts the value of this instance to its equivalent string representation, using the specified format. More...
 
- Public Member Functions inherited from xtd::icomparable< box< type_t > >
- Public Member Functions inherited from xtd::iequatable< box< type_t > >
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
 
- Static Public Member Functions inherited from xtd::box< type_t >
static type_t parse (const xtd::ustring &value)
 Converts the string to its type_t equivalent. More...
 
static bool try_parse (const xtd::ustring &value, type_t &result)
 Converts the string to its type_t equivalent. A return value indicates whether the conversion succeeded or failed. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Member Data Documentation

◆ epsilon

template<typename type_t>
constexpr type_t xtd::box_floating_point< type_t >::epsilon = __get_epsilon(type_t{})
static

Represents the smallest positive type_t value greater than zero. This field is constant.

Remarks
The value of this field is 4.94066e-324.

◆ infinity

template<typename type_t>
constexpr type_t xtd::box_floating_point< type_t >::infinity = std::numeric_limits<type_t>::infinity()
static

Represents infinity. This field is constant.

Remarks
The value of this field is std::numeric_limits<type_t>::infinity().

◆ NaN

template<typename type_t>
constexpr type_t xtd::box_floating_point< type_t >::NaN = std::numeric_limits<type_t>::quiet_NaN()
static

Represents not a number (NaN). This field is constant.

Remarks
The value of this field is std::numeric_limits<type_t>::quiet_NaN().

◆ negative_infinity

template<typename type_t>
constexpr type_t xtd::box_floating_point< type_t >::negative_infinity = -infinity
static

Represents negative infinity. This field is constant.

Remarks
The value of this field is -std::numeric_limits<type_t>::infinity().

◆ positive_infinity

template<typename type_t>
constexpr type_t xtd::box_floating_point< type_t >::positive_infinity = +infinity
static

Represents positive infinity. This field is constant.

Remarks
The value of this field is std::numeric_limits<type_t>::infinity().

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