Navigation
API > API/Plugins > API/Plugins/GameplayCameras > API/Plugins/GameplayCameras/Math > API/Plugins/GameplayCameras/Math/TConsumableValue > API/Plugins/GameplayCameras/Math/TConsumableValue/Apply
References
| Module | GameplayCameras |
| Header | /Engine/Plugins/Cameras/GameplayCameras/Source/GameplayCameras/Public/Math/ConsumableValue.h |
| Include | #include "Math/ConsumableValue.h" |
ValueType Apply
(
const ValueType InTarget,
const ValueType InMinTarget,
const ValueType InMaxTarget
)
Remarks
Applies the consumable to the given value and returns the new value. However, check that the return value falls within the given min/max bounds. If not, only consume enough to reach those bounds and leave the rest to be consumed later.
This is meant to be used as follows:
MyFooBar = Consumable.Apply(MyFooBar, MyMin, MyMax);
After this, the consumable may or may not have any value left in it, depending on whether the given min/max bounds were reached.