2017-01-25 12:01:38 +00:00
|
|
|
var RND = require('./random-data-generator/RandomDataGenerator');
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2016-12-13 16:38:47 +00:00
|
|
|
// CONSTs (makes them visible under Phaser.Math)
|
|
|
|
PI2: Math.PI * 2,
|
|
|
|
TAU: Math.PI * 0.5,
|
|
|
|
EPSILON: 1.0e-6,
|
|
|
|
DEG_TO_RAD: Math.PI / 180,
|
|
|
|
RAD_TO_DEG: 180 / Math.PI,
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
// Collections of functions
|
|
|
|
Angle: require('./angle/'),
|
|
|
|
Distance: require('./distance/'),
|
|
|
|
Easing: require('./easing/'),
|
|
|
|
Fuzzy: require('./fuzzy/'),
|
|
|
|
Interpolation: require('./interpolation/'),
|
|
|
|
Pow2: require('./pow2/'),
|
|
|
|
Snap: require('./snap/'),
|
|
|
|
|
2017-01-25 12:01:38 +00:00
|
|
|
// Random Data Generator
|
|
|
|
RND: new RND(),
|
|
|
|
|
2016-12-13 16:12:25 +00:00
|
|
|
// Single functions
|
|
|
|
Average: require('./Average'),
|
|
|
|
Bernstein: require('./Bernstein'),
|
|
|
|
Between: require('./Between'),
|
|
|
|
CatmullRom: require('./CatmullRom'),
|
|
|
|
CeilTo: require('./CeilTo'),
|
|
|
|
Clamp: require('./Clamp'),
|
|
|
|
DegToRad: require('./DegToRad'),
|
|
|
|
Difference: require('./Difference'),
|
|
|
|
Factorial: require('./Factorial'),
|
|
|
|
FloatBetween: require('./FloatBetween'),
|
|
|
|
FloorTo: require('./FloorTo'),
|
2017-04-27 16:03:19 +00:00
|
|
|
GetSpeed: require('./GetSpeed'),
|
2016-12-13 16:12:25 +00:00
|
|
|
Linear: require('./Linear'),
|
|
|
|
MaxAdd: require('./MaxAdd'),
|
|
|
|
MinSub: require('./MinSub'),
|
|
|
|
Percent: require('./Percent'),
|
|
|
|
RadToDeg: require('./RadToDeg'),
|
|
|
|
Rotate: require('./Rotate'),
|
|
|
|
RotateAround: require('./RotateAround'),
|
2017-01-03 22:47:26 +00:00
|
|
|
RotateAroundDistance: require('./RotateAroundDistance'),
|
2016-12-13 16:12:25 +00:00
|
|
|
RoundAwayFromZero: require('./RoundAwayFromZero'),
|
|
|
|
RoundTo: require('./RoundTo'),
|
|
|
|
SinCosTableGenerator: require('./SinCosTableGenerator'),
|
|
|
|
SmootherStep: require('./SmootherStep'),
|
|
|
|
SmoothStep: require('./SmoothStep'),
|
|
|
|
Within: require('./Within'),
|
|
|
|
Wrap: require('./Wrap')
|
|
|
|
|
|
|
|
};
|