feisty meow concerns codebase  2.140
mathematics::double_plus Class Reference

#include <double_plus.h>

Inheritance diagram for mathematics::double_plus:
Collaboration diagram for mathematics::double_plus:

Public Member Functions

 double_plus (double init=0.0, double delta=DEFAULT_DELTA)
 initializes using "init" as the initial value and equality within "delta". More...
 
 double_plus (const double_plus &to_copy)
 initializes this from "to_copy". More...
 
virtual ~double_plus ()
 
 DEFINE_CLASS_NAME ("double_plus")
 
double_plusoperator= (const double_plus &cp)
 standard assignment operator. More...
 
double value () const
 observes the value held in this. More...
 
 operator double () const
 observes the value held in this. More...
 
double delta () const
 observes the precision for equality comparisons. More...
 
void delta (double new_delta)
 modifies the precision for equality comparisons. More...
 
double truncate () const
 returns a version of the number that is chopped off past the delta after rounding. More...
 
virtual bool equal_to (const basis::equalizable &f2) const
 returns true if this equals "f2" within the "delta" precision. More...
 
virtual bool less_than (const basis::orderable &f2) const
 
- Public Member Functions inherited from basis::orderable
virtual bool operator< (const orderable &s2) const
 the virtual method for object ordering. More...
 
- Public Member Functions inherited from basis::equalizable
virtual bool operator== (const equalizable &s2) const
 the virtual method for object equality. More...
 

Detailed Description

Definition at line 36 of file double_plus.h.

Constructor & Destructor Documentation

◆ double_plus() [1/2]

mathematics::double_plus::double_plus ( double  init = 0.0,
double  delta = DEFAULT_DELTA 
)
inline

initializes using "init" as the initial value and equality within "delta".

Definition at line 46 of file double_plus.h.

◆ double_plus() [2/2]

mathematics::double_plus::double_plus ( const double_plus to_copy)
inline

initializes this from "to_copy".

Definition at line 49 of file double_plus.h.

◆ ~double_plus()

virtual mathematics::double_plus::~double_plus ( )
inlinevirtual

Definition at line 51 of file double_plus.h.

Member Function Documentation

◆ DEFINE_CLASS_NAME()

mathematics::double_plus::DEFINE_CLASS_NAME ( "double_plus"  )

◆ delta() [1/2]

double mathematics::double_plus::delta ( ) const
inline

observes the precision for equality comparisons.

Definition at line 64 of file double_plus.h.

◆ delta() [2/2]

void mathematics::double_plus::delta ( double  new_delta)
inline

modifies the precision for equality comparisons.

Definition at line 66 of file double_plus.h.

◆ equal_to()

virtual bool mathematics::double_plus::equal_to ( const basis::equalizable f2) const
inlinevirtual

returns true if this equals "f2" within the "delta" precision.

returns true if this is less than "f2".

Implements basis::equalizable.

Definition at line 73 of file double_plus.h.

◆ less_than()

virtual bool mathematics::double_plus::less_than ( const basis::orderable f2) const
inlinevirtual

Implements basis::orderable.

Definition at line 80 of file double_plus.h.

◆ operator double()

mathematics::double_plus::operator double ( ) const
inline

observes the value held in this.

Definition at line 61 of file double_plus.h.

References truncate().

◆ operator=()

double_plus& mathematics::double_plus::operator= ( const double_plus cp)
inline

standard assignment operator.

Definition at line 56 of file double_plus.h.

◆ truncate()

double mathematics::double_plus::truncate ( ) const
inline

returns a version of the number that is chopped off past the delta after rounding.

Definition at line 69 of file double_plus.h.

References mathematics::math_ops::round_it().

Referenced by operator double(), and value().

◆ value()

double mathematics::double_plus::value ( ) const
inline

observes the value held in this.

Definition at line 59 of file double_plus.h.

References truncate().


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