MCPcopy Create free account
hub / github.com/comaps/comaps / PowUint

Function PowUint

libs/base/math.hpp:116–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114// Computes x^n.
115template <typename T>
116T PowUint(T x, uint64_t n)
117{
118 T res = 1;
119 for (T t = x; n > 0; n >>= 1, t *= t)
120 if (n & 1)
121 res *= t;
122 return res;
123}
124
125template <typename T>
126T Pow2(T x)

Callers 6

MatchMGRSCoordsFunction · 0.85
UNIT_TESTFunction · 0.85
InitMethod · 0.85
UNIT_TESTFunction · 0.85
UNIT_TESTFunction · 0.85
WithPrecisionFunction · 0.85

Calls

no outgoing calls

Tested by 3

UNIT_TESTFunction · 0.68
UNIT_TESTFunction · 0.68
UNIT_TESTFunction · 0.68