IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
igros::klib::divmod_t< T > Struct Template Referencefinal

Combined division & modulo result. More...

#include <klib/kMath.hpp>

Collaboration diagram for igros::klib::divmod_t< T >:

Public Member Functions

constexpr auto operator== (const divmod_t &other) const noexcept -> bool=default
 Comparison.

Public Attributes

T quotient
 Quotient (truncated towards zero).
T remainder
 Remainder (sign of dividend).

Detailed Description

template<std::integral T>
struct igros::klib::divmod_t< T >

Combined division & modulo result.

Template Parameters
TInteger type

Definition at line 31 of file kMath.hpp.

Member Function Documentation

◆ operator==()

template<std::integral T>
auto igros::klib::divmod_t< T >::operator== ( const divmod_t< T > & other) const->bool=default
constexprdefaultnoexcept

Comparison.

Parameters
otherCompared result
Returns
true if quotients and remainders are equal

Member Data Documentation

◆ quotient

template<std::integral T>
T igros::klib::divmod_t< T >::quotient

Quotient (truncated towards zero).

Definition at line 32 of file kMath.hpp.

◆ remainder

template<std::integral T>
T igros::klib::divmod_t< T >::remainder

Remainder (sign of dividend).

Definition at line 33 of file kMath.hpp.


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