M5Utility 0.0.2 git rev:5c1a751
Loading...
Searching...
No Matches
math.hpp File Reference

Maths-related. More...

#include <cstdint>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  m5
 Top level namespace of M5.
 

Functions

template<typename T >
constexpr bool m5::math::is_powerof2 (const T v)
 Is value power of 2?
 

Detailed Description

Maths-related.

Function Documentation

◆ is_powerof2()

template<typename T >
bool m5::math::is_powerof2 ( const T v)
inlineconstexpr

Is value power of 2?

Template Parameters
Typeof the value
Parameters
vValue
Returns
True if value is power of 2