1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00
rpcs3/Utilities/Interval.h
Nekotekina 4fedf5749e cellSysmoduleLoadModule modified
cellSysutilEnableBgmPlayback draft
cellSurMixerGetCurrentBlockTag
cellSurMixerGetTimestamp
Interval.h draft
2014-06-09 17:35:35 +04:00

42 lines
545 B
C++

#pragma once
template<typename T>
struct BaseInterval
{
static const uint64_t zero = 0ull;
static const uint64_t notz = 0xffffffffffffffffull;
T m_min, m_max;
static BaseInterval<T> make(T min_value, T max_value)
{
BaseInterval<T> res = { min_value, max_value };
return res;
}
static BaseInterval<T> make()
{
return make((T&)zero, (T&)notz);
}
bool getconst(T& result)
{
if (m_min == m_max)
{
result = m_min;
return true;
}
else
{
return false;
}
}
bool isindef()
{
if (T == float)
{
}
}
};