-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cellSysutilEnableBgmPlayback draft cellSurMixerGetCurrentBlockTag cellSurMixerGetTimestamp Interval.h draft
- Loading branch information
Nekotekina
committed
Jun 9, 2014
1 parent
0d42fcf
commit 4fedf57
Showing
5 changed files
with
124 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
{ | ||
|
||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters