libfxd 0.2.dev
A fixed-point library for C++.
Loading...
Searching...
No Matches
fxd::saturate::zero Namespace Reference

Round to zero, and clamp on overflow. More...

Functions

template<fixed_point Fxd>
constexpr Fxd div (Fxd a, Fxd b) noexcept
 Divide rounding to zero, clamp on overflow.
 
template<fixed_point Fxd>
constexpr Fxd mul (Fxd a, Fxd b) noexcept
 Multiply rounding to zero, clamp on overflow.
 

Detailed Description

Round to zero, and clamp on overflow.

Function Documentation

◆ div()

constexpr Fxd div ( Fxd  a,
Fxd  b 
)
constexprnoexcept

Divide rounding to zero, clamp on overflow.

Definition at line 367 of file saturate.hpp.

◆ mul()

constexpr Fxd mul ( Fxd  a,
Fxd  b 
)
constexprnoexcept

Multiply rounding to zero, clamp on overflow.

Definition at line 379 of file saturate.hpp.