arcade-physics
Version:
Use Arcade Physics without Phaser.
23 lines • 822 B
TypeScript
export default RandomXY;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Compute a random unit vector.
*
* Computes random values for the given vector between -1 and 1 that can be used to represent a direction.
*
* Optionally accepts a scale value to scale the resulting vector by.
*
* @function Phaser.Math.RandomXY
* @since 3.0.0
*
* @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.
* @param {number} [scale=1] - The scale of the random values.
*
* @return {Phaser.Math.Vector2} The given Vector.
*/
declare function RandomXY(vector: Phaser.Math.Vector2, scale?: number | undefined): Phaser.Math.Vector2;
//# sourceMappingURL=RandomXY.d.ts.map