Inventory System
Search Results for

    Show / Hide Table of Contents

    Class MathUtils

    Static Utility for common math problems.

    Inheritance
    object
    MathUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: InventorySystem.Utils
    Assembly: InventorySystem.dll
    Syntax
    public static class MathUtils

    Methods

    | Edit this page View Source

    ClampWithLeftover(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)

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX