Operating System Simulator Plugin
3.5.1
Unreal Engine plugin that simulates an Operating System Environment
|
#include "OperatingSystemRangeTime.h"
Public Member Functions | |
FORCEINLINE bool | IsValid () const |
FORCEINLINE float | GetTime (const float FallbackTime=1.f) const |
FOperatingSystemRangeTime () | |
FOperatingSystemRangeTime (const float &MinTime, const float &MaxTime) | |
Represents a range of time for an operating system.
An instance of this class contains a minimum time and a maximum time, both measured in seconds. The minimum time must be greater than or equal to zero and less than or equal to the maximum time. The maximum time must be greater than zero and greater than or equal to the minimum time.
The methods available in this class allow you to check if the range is valid and obtain a random time within the range.
Example usage:
|
inline |
Default constructor for the FOperatingSystemRangeTime class.
Initializes the MinTime to 0 and the MaxTime to 1.
|
inline |
Creates a new instance of FOperatingSystemRangeTime with the specified minimum and maximum times.
MinTime | The minimum time (in seconds) for the range. Must be >= 0 and <= MaxTime. |
MaxTime | The maximum time (in seconds) for the range. Must be > 0 and >= MinTime. |
|
inline |
Returns a random time within the range of MinTime to MaxTime. If the range is not valid, it returns the FallbackTime parameter value. If the fallback time is less than 0.0001 then return 1.f.
FallbackTime | The fallback time to return if the range is not valid. Default is 1.f. |
|
inline |
Checks if the range of time is valid.
The range of time is considered valid if the following conditions are met: