Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function<float> power(float base, int exp)
- {
- var<float> res = 1;
- while (exp > 0)
- {
- if (exp&1)
- res *= base;
- base *= base;
- exp >>= 1;
- }
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement