mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
cellSysmoduleLoadModule modified
cellSysutilEnableBgmPlayback draft cellSurMixerGetCurrentBlockTag cellSurMixerGetTimestamp Interval.h draft
This commit is contained in:
parent
0d42fcf536
commit
4fedf5749e
5 changed files with 125 additions and 14 deletions
42
Utilities/Interval.h
Normal file
42
Utilities/Interval.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue