mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T668, clamp time fraction [0,1]
This commit is contained in:
@@ -21,6 +21,12 @@ namespace BlackMisc
|
||||
return timeFraction >= 0.0 && timeFraction <= 1.0;
|
||||
}
|
||||
|
||||
//! Valid time fraction [0,1], this allows minor overshooting
|
||||
inline bool isAcceptableTimeFraction(double timeFraction)
|
||||
{
|
||||
return timeFraction >= 0.0 && timeFraction <= 1.01;
|
||||
}
|
||||
|
||||
//! Clamp time fraction [0,1]
|
||||
inline double clampValidTimeFraction(double timeFraction)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user