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

Strong type for a Rational numerator. More...

#include <rational.hpp>

Public Member Functions

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

Public Attributes

std::int64_t value {}
 Raw signed integer value.

Detailed Description

Strong type for a Rational numerator.

Prevents numerator/denominator argument swapping at construction sites.

Definition at line 140 of file rational.hpp.

Constructor & Destructor Documentation

◆ Numerator()

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

Explicit so the type must be spelled out.

Parameters
rawThe integer to box as a numerator.

Definition at line 148 of file rational.hpp.

Member Data Documentation

◆ value

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

Raw signed integer value.

Definition at line 142 of file rational.hpp.


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