Audacity 3.2.0
Functions
graphics::details Namespace Reference

Functions

template<typename DataType >
constexpr DataType GetPositiveSizeValue (DataType value) noexcept
 

Function Documentation

◆ GetPositiveSizeValue()

template<typename DataType >
constexpr DataType graphics::details::GetPositiveSizeValue ( DataType  value)
constexprnoexcept

Definition at line 21 of file Size.h.

22{
23 if constexpr (std::is_unsigned_v<DataType>)
24 return value;
25 else
26 return value >= DataType {} ? value : -value;
27}

Referenced by graphics::SizeType< DataType >::operator*=(), graphics::SizeType< DataType >::operator+=(), graphics::SizeType< DataType >::operator-=(), and graphics::SizeType< DataType >::operator/=().

Here is the caller graph for this function: