MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
marvin::utils::Range< T > Struct Template Reference

POD type that represents a range of values, for classes requiring a min and a max. More...

#include <marvin_Range.h>

Public Member Functions

midpoint () const noexcept
 

Public Attributes

min
 
max
 

Detailed Description

template<NumericType T>
struct marvin::utils::Range< T >

POD type that represents a range of values, for classes requiring a min and a max.

Literally just two T-s - mainly exists to avoid needing to use std::tuple.

Member Function Documentation

◆ midpoint()

template<NumericType T>
T marvin::utils::Range< T >::midpoint ( ) const
inlinenodiscardnoexcept

Calculates the midpoint between min and max.

Returns
The midpoint between min and max.

Member Data Documentation

◆ max

template<NumericType T>
T marvin::utils::Range< T >::max

◆ min

template<NumericType T>
T marvin::utils::Range< T >::min

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