yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1#ifndef SLANG_CORE_RANGE_H 2#define SLANG_CORE_RANGE_H 3 4namespace Slang 5{ 6template < typename T > 7struct Range 8{ 9T begin = 0 ; 10T end = 0 ; 11 12bool inRange (T val )const {return val >=begin && val < end ; } 13}; 14 15template < typename T > 16Range < T > makeRange (T begin ,T end ) 17{ 18Range < T > result ; 19result .begin = begin ; 20result .end = end ; 21return result ; 22} 23 24}// namespace Slang 25 26#endif // SLANG_CORE_RANGE_H