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

Strong type for a Rational denominator. More...

#include <rational.hpp>

Public Member Functions

constexpr Denominator (std::int64_t raw) noexcept
 Explicit so the type must be spelled out.

Public Attributes

std::int64_t value {}
 Raw signed integer value; must never be zero after canonicalisation.

Detailed Description

Strong type for a Rational denominator.

Prevents numerator/denominator argument swapping at construction sites.

Definition at line 154 of file rational.hpp.

Constructor & Destructor Documentation

◆ Denominator()

morph::math::Denominator::Denominator ( std::int64_t raw)
inlineexplicitconstexprnoexcept

Explicit so the type must be spelled out.

Parameters
rawThe integer to box as a denominator.

Definition at line 162 of file rational.hpp.

Member Data Documentation

◆ value

std::int64_t morph::math::Denominator::value {}

Raw signed integer value; must never be zero after canonicalisation.

Definition at line 156 of file rational.hpp.


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