Karma Engine
Loading...
Searching...
No Matches
KarmaMath.h
1#pragma once
2
3#include "krpch.h"
4
5#include "glm/common.hpp"
6
7namespace Karma
8{
9 struct KARMA_API FMath
10 {
12 template< class T >
13 static T Max(const T A, const T B)
14 {
15 return glm::max(A, B);
16 }
17
19 template< class T >
20 static T Min(const T A, const T B)
21 {
22 return glm::min(A, B);
23 }
24
25 static uint32_t CountTrailingZeros(uint32_t Value)
26 {
27 // return 32 if value was 0
28 unsigned long BitIndex = 0; // 0-based, where the LSB is 0 and MSB is 31
29 return Value;//_BitScanForward(&BitIndex, Value) ? BitIndex : 32;
30 }
31 };
32}
Definition KarmaMath.h:10
static T Max(const T A, const T B)
Definition KarmaMath.h:13
static T Min(const T A, const T B)
Definition KarmaMath.h:20