morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::Decimal Struct Reference

An exact decimal: a math::Rational whose DecimalPlaces are the value's declared places. More...

#include <value.hpp>

Public Member Functions

bool operator== (Decimal const &other) const noexcept
 Equality of magnitude and places.

Public Attributes

math::Rational value
 The exact value, with its declared places.

Detailed Description

An exact decimal: a math::Rational whose DecimalPlaces are the value's declared places.

The places are part of the value: two decimals equal in magnitude and different in places compare unequal, because they display differently. expr/1's eq compares magnitudes.

Definition at line 95 of file value.hpp.

Member Function Documentation

◆ operator==()

bool morph::ui::Decimal::operator== ( Decimal const & other) const
inlinenodiscardnoexcept

Equality of magnitude and places.

Parameters
otherThe decimal to compare with.
Returns
Whether both the canonical fraction and the places are equal.

Definition at line 102 of file value.hpp.

Member Data Documentation

◆ value

math::Rational morph::ui::Decimal::value

The exact value, with its declared places.

Definition at line 97 of file value.hpp.


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