Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> Wrap(value, min, max)

Description:

Wrap the given value between min and `max.

Parameters:

name type description
value number

The value to wrap.

min number

The minimum value.

max number

The maximum value.

Returns:
Description:

The wrapped value.

Type:
  • number
Examples:
Since: 3.0.0
Source: src/math/Wrap.js (Line 7)