Class MathUtils
Static Utility for common math problems.
Inherited Members
Namespace: InventorySystem.Utils
Assembly: InventorySystem.dll
Syntax
public static class MathUtils
Methods
| Edit this page View SourceClampWithLeftover(int, int)
Clamps a value to a max limit and returns the clamped value and leftover.
Declaration
public static (int clampedValue, int leftover) ClampWithLeftover(int originalValue, int max)
Parameters
Type | Name | Description |
---|---|---|
int | originalValue | The original value before clamping. |
int | max | The maximum allowed value. |
Returns
Type | Description |
---|---|
(int clampedValue, int leftover) | A tuple of (clampedValue, leftover) |