Math#minSub()

minSub(value, amount, min) → {number}

Subtracts the given amount from the value, but never lets the value go below the specified minimum.

Parameters
Name Type Description
value number

The base value.

amount number

The amount to subtract from the base value.

min number

The minimum the value is allowed to be.

Returns
number -

The new value.

Source code: math/Math.js (Line 506)
doc_phaser
2017-02-14 10:54:59
Comments
Leave a Comment

Please login to continue.