phaser/v2-community/resources/docgen/output/Phaser.Math.json
2016-11-23 00:17:46 +00:00

1 line
No EOL
36 KiB
JSON
Executable file

{"class":{"name":"Phaser.Math","extends":"","static":true,"constructor":false,"parameters":[],"help":"A collection of mathematical methods."},"consts":[],"methods":{"public":[{"name":"Linear","static":false,"returns":{"types":["number"],"help":""},"help":"Calculates a linear value over t.","line":973,"public":true,"protected":false,"private":false,"parameters":[{"name":"p0","type":["number"],"help":"","optional":false,"default":null},{"name":"p1","type":["number"],"help":"","optional":false,"default":null},{"name":"t","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"PI2","static":false,"returns":null,"help":"= 2 &pi;","line":18,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"angleBetween","static":false,"returns":{"types":["number"],"help":""},"help":"Find the angle of a segment from (x1, y1) -> (x2, y2).","line":338,"public":true,"protected":false,"private":false,"parameters":[{"name":"x1","type":["number"],"help":"","optional":false,"default":null},{"name":"y1","type":["number"],"help":"","optional":false,"default":null},{"name":"x2","type":["number"],"help":"","optional":false,"default":null},{"name":"y2","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angleBetweenPoints","static":false,"returns":{"types":["number"],"help":""},"help":"Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).","line":365,"public":true,"protected":false,"private":false,"parameters":[{"name":"point1","type":["Phaser.Point"],"help":"","optional":false,"default":null},{"name":"point2","type":["Phaser.Point"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angleBetweenPointsY","static":false,"returns":{"types":["number"],"help":""},"help":"Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).","line":376,"public":true,"protected":false,"private":false,"parameters":[{"name":"point1","type":["Phaser.Point"],"help":"","optional":false,"default":null},{"name":"point2","type":["Phaser.Point"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angleBetweenY","static":false,"returns":{"types":["number"],"help":""},"help":"Find the angle of a segment from (x1, y1) -> (x2, y2).\\nNote that the difference between this method and Math.angleBetween is that this assumes the y coordinate travels\\ndown the screen.","line":354,"public":true,"protected":false,"private":false,"parameters":[{"name":"x1","type":["number"],"help":"","optional":false,"default":null},{"name":"y1","type":["number"],"help":"","optional":false,"default":null},{"name":"x2","type":["number"],"help":"","optional":false,"default":null},{"name":"y2","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angleLimit","static":false,"returns":{"types":["number"],"help":"The new angle value, returns the same as the input angle if it was within bounds"},"help":"Keeps an angle value between the given min and max values.","line":859,"public":true,"protected":false,"private":false,"parameters":[{"name":"angle","type":["number"],"help":"The angle value to check. Must be between -180 and +180.","optional":false,"default":null},{"name":"min","type":["number"],"help":"The minimum angle that is allowed (must be -180 or greater).","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum angle that is allowed (must be 180 or less).","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"average","static":false,"returns":{"types":["number"],"help":"The average of all given values."},"help":"Averages all values passed to the function and returns the result. You can pass as many parameters as you like.","line":86,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"bernstein","static":false,"returns":{"types":["number"],"help":""},"help":"","line":983,"public":true,"protected":false,"private":false,"parameters":[{"name":"n","type":["number"],"help":"","optional":false,"default":null},{"name":"i","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"bezierInterpolation","static":false,"returns":{"types":["number"],"help":""},"help":"A Bezier Interpolation Method, mostly used by Phaser.Tween.","line":910,"public":true,"protected":false,"private":false,"parameters":[{"name":"v","type":["array"],"help":"","optional":false,"default":null},{"name":"k","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"catmullRom","static":false,"returns":{"types":["number"],"help":""},"help":"Calculates a callmum rom value.","line":1020,"public":true,"protected":false,"private":false,"parameters":[{"name":"p0","type":["number"],"help":"","optional":false,"default":null},{"name":"p1","type":["number"],"help":"","optional":false,"default":null},{"name":"p2","type":["number"],"help":"","optional":false,"default":null},{"name":"p3","type":["number"],"help":"","optional":false,"default":null},{"name":"t","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"catmullRomInterpolation","static":false,"returns":{"types":["number"],"help":""},"help":"A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.","line":931,"public":true,"protected":false,"private":false,"parameters":[{"name":"v","type":["array"],"help":"","optional":false,"default":null},{"name":"k","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"ceil","static":false,"returns":{"types":["number"],"help":"The rounded value of that number."},"help":"Round up to the next whole number. E.g. ceil(1.3) == 2, and ceil(-2.3) == -3.","line":1130,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"Any number.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"ceilTo","static":false,"returns":{"types":["number"],"help":""},"help":"","line":306,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to round.","optional":false,"default":null},{"name":"place","type":["number"],"help":"The place to round to.","optional":false,"default":null},{"name":"base","type":["number"],"help":"The base to round in... default is 10 for decimal.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"chanceRoll","static":false,"returns":{"types":["boolean"],"help":"True if the roll passed, or false otherwise."},"help":"Generate a random bool result based on the chance value.\\n<p>\\nReturns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance\\nof getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed.\\n<\/p>","line":441,"public":true,"protected":false,"private":false,"parameters":[{"name":"chance","type":["number"],"help":"The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clamp","static":false,"returns":{"types":["number"],"help":""},"help":"Force a value within the boundaries of two values.\\nClamp value to range <a, b>","line":1276,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null},{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clampBottom","static":false,"returns":{"types":["number"],"help":""},"help":"Clamp value to range <a, inf).","line":1290,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null},{"name":"a","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"degToRad","static":false,"returns":{"types":["function"],"help":""},"help":"Convert degrees to radians.","line":1408,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"difference","static":false,"returns":{"types":["number"],"help":""},"help":"","line":1034,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"distance","static":false,"returns":{"types":["number"],"help":"The distance between the two sets of coordinates."},"help":"Returns the distance between the two given set of coordinates.","line":1222,"public":true,"protected":false,"private":false,"parameters":[{"name":"x1","type":["number"],"help":"","optional":false,"default":null},{"name":"y1","type":["number"],"help":"","optional":false,"default":null},{"name":"x2","type":["number"],"help":"","optional":false,"default":null},{"name":"y2","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"distancePow","static":false,"returns":{"types":["number"],"help":"The distance between the two sets of coordinates."},"help":"Returns the distance between the two given set of coordinates at the power given.","line":1242,"public":true,"protected":false,"private":false,"parameters":[{"name":"x1","type":["number"],"help":"","optional":false,"default":null},{"name":"y1","type":["number"],"help":"","optional":false,"default":null},{"name":"x2","type":["number"],"help":"","optional":false,"default":null},{"name":"y2","type":["number"],"help":"","optional":false,"default":null},{"name":"pow","type":["number"],"help":"","optional":true,"default":"2"}],"inherited":false,"inheritedFrom":""},{"name":"distanceRounded","static":false,"returns":{"types":["number"],"help":"The distance between this Point object and the destination Point object."},"help":"Returns the rounded distance between the two given set of coordinates.","line":1260,"public":true,"protected":false,"private":false,"parameters":[{"name":"x1","type":["number"],"help":"","optional":false,"default":null},{"name":"y1","type":["number"],"help":"","optional":false,"default":null},{"name":"x2","type":["number"],"help":"","optional":false,"default":null},{"name":"y2","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"factorial","static":false,"returns":{"types":["number"],"help":""},"help":"","line":992,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"the number you want to evaluate","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"floor","static":false,"returns":{"types":["number"],"help":"The rounded value of that number."},"help":"Round down to the next whole number. E.g. floor(1.7) == 1, and floor(-2.7) == -2.","line":1115,"public":true,"protected":false,"private":false,"parameters":[{"name":"Value","type":["number"],"help":" Any number.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"floorTo","static":false,"returns":{"types":["number"],"help":""},"help":"","line":288,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to round.","optional":false,"default":null},{"name":"place","type":["number"],"help":"The place to round to.","optional":false,"default":null},{"name":"base","type":["number"],"help":"The base to round in... default is 10 for decimal.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fuzzyCeil","static":false,"returns":{"types":["boolean"],"help":"ceiling(val-&epsilon;)"},"help":"","line":65,"public":true,"protected":false,"private":false,"parameters":[{"name":"val","type":["number"],"help":"","optional":false,"default":null},{"name":"epsilon","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fuzzyEqual","static":false,"returns":{"types":["boolean"],"help":"True if |a-b|<&epsilon;"},"help":"Two number are fuzzyEqual if their difference is less than &epsilon;.","line":28,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null},{"name":"epsilon","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fuzzyFloor","static":false,"returns":{"types":["boolean"],"help":"floor(val-&epsilon;)"},"help":"","line":76,"public":true,"protected":false,"private":false,"parameters":[{"name":"val","type":["number"],"help":"","optional":false,"default":null},{"name":"epsilon","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fuzzyGreaterThan","static":false,"returns":{"types":["boolean"],"help":"True if a>b+&epsilon;"},"help":"a is fuzzyGreaterThan b if it is more than b - &epsilon;.","line":54,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null},{"name":"epsilon","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fuzzyLessThan","static":false,"returns":{"types":["boolean"],"help":"True if a<b+&epsilon;"},"help":"a is fuzzyLessThan b if it is less than b + &epsilon;.","line":41,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null},{"name":"epsilon","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getRandom","static":false,"returns":{"types":["object"],"help":"The random object that was selected."},"help":"Fetch a random entry from the given array.\\nWill return null if random selection is missing, or array has no entries.","line":1048,"public":true,"protected":false,"private":false,"parameters":[{"name":"objects","type":["array"],"help":"An array of objects.","optional":false,"default":null},{"name":"startIndex","type":["number"],"help":"Optional offset off the front of the array. Default value is 0, or the beginning of the array.","optional":false,"default":null},{"name":"length","type":["number"],"help":"Optional restriction on the number of values you want to randomly select from.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"interpolateFloat","static":false,"returns":{"types":["number"],"help":""},"help":"A one dimensional linear interpolation of a value.","line":325,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"","optional":false,"default":null},{"name":"b","type":["number"],"help":"","optional":false,"default":null},{"name":"weight","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"isEven","static":false,"returns":{"types":["boolean"],"help":"True if the given number is even. False if the given number is odd."},"help":"Returns true if the number given is even.","line":703,"public":true,"protected":false,"private":false,"parameters":[{"name":"n","type":["number"],"help":"The number to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"isOdd","static":false,"returns":{"types":["boolean"],"help":"True if the given number is odd. False if the given number is even."},"help":"Returns true if the number given is odd.","line":690,"public":true,"protected":false,"private":false,"parameters":[{"name":"n","type":["number"],"help":"The number to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"limitValue","static":false,"returns":{"types":["number"],"help":"The limited value."},"help":"Ensures the given value is between min and max inclusive.","line":665,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to limit.","optional":false,"default":null},{"name":"min","type":["number"],"help":"The minimum the value can be.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum the value can be.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"linearInterpolation","static":false,"returns":{"types":["number"],"help":""},"help":"A Linear Interpolation Method, mostly used by Phaser.Tween.","line":883,"public":true,"protected":false,"private":false,"parameters":[{"name":"v","type":["array"],"help":"","optional":false,"default":null},{"name":"k","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"mapLinear","static":false,"returns":{"types":["number"],"help":""},"help":"Linear mapping from range <a1, a2> to range <b1, b2>","line":1322,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":" the value to map","optional":false,"default":null},{"name":"a1","type":["number"],"help":" first endpoint of the range <a1, a2>","optional":false,"default":null},{"name":"a2","type":["number"],"help":" final endpoint of the range <a1, a2>","optional":false,"default":null},{"name":"b1","type":["number"],"help":" first endpoint of the range <b1, b2>","optional":false,"default":null},{"name":"b2","type":["number"],"help":" final endpoint of the range <b1, b2>","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"max","static":false,"returns":{"types":["number"],"help":"The largest value from those given."},"help":"Updated version of Math.max that can be passed either an array of numbers or the numbers as parameters.","line":752,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"maxAdd","static":false,"returns":{"types":["number"],"help":""},"help":"Adds the given amount to the value, but never lets the value go over the specified maximum.","line":569,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to add the amount to.","optional":false,"default":null},{"name":"amount","type":["number"],"help":"The amount to add to the value.","optional":false,"default":null},{"name":"max-","type":["number"],"help":" The maximum the value is allowed to be.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"maxProperty","static":false,"returns":{"types":["number"],"help":"The largest value from those given."},"help":"Updated version of Math.max that can be passed a property and either an array of objects or the objects as parameters.\\nIt will find the largest matching property value from the given objects.","line":812,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"min","static":false,"returns":{"types":["number"],"help":"The lowest value from those given."},"help":"Updated version of Math.min that can be passed either an array of numbers or the numbers as parameters.\\nSee http:\/\/jsperf.com\/math-s-min-max-vs-homemade\/5","line":723,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"minProperty","static":false,"returns":{"types":["number"],"help":"The lowest value from those given."},"help":"Updated version of Math.min that can be passed a property and either an array of objects or the objects as parameters.\\nIt will find the lowest matching property value from the given objects.","line":782,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"minSub","static":false,"returns":{"types":["number"],"help":"The new value."},"help":"Subtracts the given amount from the value, but never lets the value go below the specified minimum.","line":591,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The base value.","optional":false,"default":null},{"name":"amount","type":["number"],"help":"The amount to subtract from the base value.","optional":false,"default":null},{"name":"min","type":["number"],"help":"The minimum the value is allowed to be.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"normalizeAngle","static":false,"returns":{"types":["number"],"help":"Returns the angle, fit within the [0,2pi] range, in radians."},"help":"Normalizes an angle to the [0,2pi) range.","line":396,"public":true,"protected":false,"private":false,"parameters":[{"name":"angleRad","type":["number"],"help":"The angle to normalize, in radians.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"normalizeLatitude","static":false,"returns":{"types":["number"],"help":"Returns the latitude, fit within the [-90,90] range."},"help":"Normalizes a latitude to the [-90,90] range. Latitudes above 90 or below -90 are capped, not wrapped.","line":409,"public":true,"protected":false,"private":false,"parameters":[{"name":"lat","type":["number"],"help":"The latitude to normalize, in degrees.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"normalizeLongitude","static":false,"returns":{"types":["number"],"help":"Returns the longitude, fit within the [-180,180] range."},"help":"Normalizes a longitude to the [-180,180] range. Longitudes above 180 or below -180 are wrapped.","line":419,"public":true,"protected":false,"private":false,"parameters":[{"name":"lng","type":["number"],"help":"The longitude to normalize, in degrees.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"numberArray","static":false,"returns":{"types":["array"],"help":"The array of number values."},"help":"Returns an Array containing the numbers from min to max and inclusive of both values.\\nIf you need exclusive of max then see Phaser.Math.numberArrayEx.","line":476,"public":true,"protected":false,"private":false,"parameters":[{"name":"min","type":["number"],"help":"The minimum value the array starts with.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum value the array contains.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"numberArrayStep","static":true,"returns":null,"help":"Creates an array of numbers (positive and\/or negative) progressing from\\n`start` up to but not including `end`. If `start` is less than `stop` a\\nzero-length range is created unless a negative `step` is specified.\\n\\n\\nPhaser.Math.numberArrayStep(4);\\n\/\/ => [0, 1, 2, 3]\\n\\nPhaser.Math.numberArrayStep(1, 5);\\n\/\/ => [1, 2, 3, 4]\\n\\nPhaser.Math.numberArrayStep(0, 20, 5);\\n\/\/ => [0, 5, 10, 15]\\n\\nPhaser.Math.numberArrayStep(0, -4, -1);\\n\/\/ => [0, -1, -2, -3]\\n\\nPhaser.Math.numberArrayStep(1, 4, 0);\\n\/\/ => [1, 1, 1]\\n\\nPhaser.Math.numberArrayStep(0);\\n\/\/ => []","line":520,"public":true,"protected":false,"private":false,"parameters":[{"name":"start","type":["number"],"help":"The start of the range.","optional":true,"default":"0"},{"name":"end","type":["number"],"help":"The end of the range.","optional":false,"default":null},{"name":"step","type":["number"],"help":"The value to increment or decrement by.","optional":true,"default":"1"}],"inherited":false,"inheritedFrom":""},{"name":"percent","static":false,"returns":{"types":["number"],"help":"The percentage a is of b, between 0 and 1."},"help":"Work out what percentage value a is of value b using the given base.","line":1383,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"The value to work out the percentage for.","optional":false,"default":null},{"name":"b","type":["number"],"help":"The value you wish to get the percentage of.","optional":false,"default":null},{"name":"base","type":["number"],"help":"The base value.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"radToDeg","static":false,"returns":{"types":["function"],"help":""},"help":"Convert degrees to radians.","line":1426,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"randomSign","static":false,"returns":{"types":["number"],"help":" 1 or -1"},"help":"Randomly returns either a 1 or -1.","line":677,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"removeRandom","static":false,"returns":{"types":["object"],"help":"The random object that was removed."},"help":"Removes a random object from the given array and returns it.\\nWill return null if random selection is missing, or array has no entries.","line":1082,"public":true,"protected":false,"private":false,"parameters":[{"name":"objects","type":["array"],"help":"An array of objects.","optional":false,"default":null},{"name":"startIndex","type":["number"],"help":"Optional offset off the front of the array. Default value is 0, or the beginning of the array.","optional":false,"default":null},{"name":"length","type":["number"],"help":"Optional restriction on the number of values you want to randomly select from.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"reverseAngle","static":false,"returns":{"types":["number"],"help":"Returns the reverse angle, in radians."},"help":"Reverses an angle.","line":386,"public":true,"protected":false,"private":false,"parameters":[{"name":"angleRad","type":["number"],"help":"The angle to reverse, in radians.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"roundTo","static":false,"returns":{"types":["number"],"help":""},"help":"Round to some place comparative to a 'base', default is 10 for decimal place.\\n\\n'place' is represented by the power applied to 'base' to get that place\\ne.g.\\n2000\/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011\\n\\nroundTo(2000\/7,3) === 0\\nroundTo(2000\/7,2) == 300\\nroundTo(2000\/7,1) == 290\\nroundTo(2000\/7,0) == 286\\nroundTo(2000\/7,-1) == 285.7\\nroundTo(2000\/7,-2) == 285.71\\nroundTo(2000\/7,-3) == 285.714\\nroundTo(2000\/7,-4) == 285.7143\\nroundTo(2000\/7,-5) == 285.71429\\n\\nroundTo(2000\/7,3,2) == 288 -- 100100000\\nroundTo(2000\/7,2,2) == 284 -- 100011100\\nroundTo(2000\/7,1,2) == 286 -- 100011110\\nroundTo(2000\/7,0,2) == 286 -- 100011110\\nroundTo(2000\/7,-1,2) == 285.5 -- 100011101.1\\nroundTo(2000\/7,-2,2) == 285.75 -- 100011101.11\\nroundTo(2000\/7,-3,2) == 285.75 -- 100011101.11\\nroundTo(2000\/7,-4,2) == 285.6875 -- 100011101.1011\\nroundTo(2000\/7,-5,2) == 285.71875 -- 100011101.10111\\n\\nNote what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed\\nbecause we are rounding 100011.1011011011011011 which rounds up.","line":270,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to round.","optional":false,"default":null},{"name":"place","type":["number"],"help":"The place to round to.","optional":false,"default":null},{"name":"base","type":["number"],"help":"The base to round in... default is 10 for decimal.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"shear","static":false,"returns":{"types":["number"],"help":"n mod 1"},"help":"","line":118,"public":true,"protected":false,"private":false,"parameters":[{"name":"n","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"shift","static":false,"returns":{"types":["any"],"help":"The shifted value."},"help":"Removes the top element from the stack and re-inserts it onto the bottom, then returns it.\\nThe original stack is modified in the process. This effectively moves the position of the data from the start to the end of the table.","line":1183,"public":true,"protected":false,"private":false,"parameters":[{"name":"stack","type":["array"],"help":"The array to shift.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"shuffleArray","static":false,"returns":{"types":["array"],"help":"The array"},"help":"Shuffles the data in the given array into a new order","line":1198,"public":true,"protected":false,"private":false,"parameters":[{"name":"array","type":["array"],"help":"The array to shuffle","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"sign","static":false,"returns":{"types":["number"],"help":""},"help":"A value representing the sign of the value.\\n-1 for negative, +1 for positive, 0 if value is 0","line":1368,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"sinCosGenerator","static":false,"returns":{"types":["array"],"help":"Returns the sine table"},"help":"Generate a sine and cosine table simultaneously and extremely quickly. Based on research by Franky of scene.at\\n<p>\\nThe parameters allow you to specify the length, amplitude and frequency of the wave. Once you have called this function\\nyou should get the results via getSinTable() and getCosTable(). This generator is fast enough to be used in real-time.\\n<\/p>","line":1148,"public":true,"protected":false,"private":false,"parameters":[{"name":"length","type":["number"],"help":"The length of the wave","optional":false,"default":null},{"name":"sinAmplitude","type":["number"],"help":"The amplitude to apply to the sine table (default 1.0) if you need values between say -+ 125 then give 125 as the value","optional":false,"default":null},{"name":"cosAmplitude","type":["number"],"help":"The amplitude to apply to the cosine table (default 1.0) if you need values between say -+ 125 then give 125 as the value","optional":false,"default":null},{"name":"frequency","type":["number"],"help":" - The frequency of the sine and cosine table data","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"smootherstep","static":false,"returns":{"types":["number"],"help":""},"help":"Smootherstep function as detailed at http:\/\/en.wikipedia.org\/wiki\/Smoothstep","line":1353,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null},{"name":"min","type":["number"],"help":"","optional":false,"default":null},{"name":"max","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"smoothstep","static":false,"returns":{"types":["number"],"help":""},"help":"Smoothstep function as detailed at http:\/\/en.wikipedia.org\/wiki\/Smoothstep","line":1337,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null},{"name":"min","type":["number"],"help":"","optional":false,"default":null},{"name":"max","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"snapTo","static":false,"returns":{"types":["number"],"help":""},"help":"Snap a value to nearest grid slice, using rounding.\\n\\nExample: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.","line":133,"public":true,"protected":false,"private":false,"parameters":[{"name":"input","type":["number"],"help":"The value to snap.","optional":false,"default":null},{"name":"gap","type":["number"],"help":"The interval gap of the grid.","optional":false,"default":null},{"name":"start","type":["number"],"help":"Optional starting offset for gap.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"snapToCeil","static":false,"returns":{"types":["number"],"help":""},"help":"Snap a value to nearest grid slice, using ceil.\\n\\nExample: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20.","line":185,"public":true,"protected":false,"private":false,"parameters":[{"name":"input","type":["number"],"help":"The value to snap.","optional":false,"default":null},{"name":"gap","type":["number"],"help":"The interval gap of the grid.","optional":false,"default":null},{"name":"start","type":["number"],"help":"Optional starting offset for gap.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"snapToFloor","static":false,"returns":{"types":["number"],"help":""},"help":"Snap a value to nearest grid slice, using floor.\\n\\nExample: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15","line":159,"public":true,"protected":false,"private":false,"parameters":[{"name":"input","type":["number"],"help":"The value to snap.","optional":false,"default":null},{"name":"gap","type":["number"],"help":"The interval gap of the grid.","optional":false,"default":null},{"name":"start","type":["number"],"help":"Optional starting offset for gap.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"snapToInArray","static":false,"returns":{"types":["number"],"help":""},"help":"Snaps a value to the nearest value in an array.","line":209,"public":true,"protected":false,"private":false,"parameters":[{"name":"input","type":["number"],"help":"","optional":false,"default":null},{"name":"arr","type":["array"],"help":"","optional":false,"default":null},{"name":"sort","type":["boolean"],"help":"True if the array needs to be sorted.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"truncate","static":false,"returns":{"types":["number"],"help":""},"help":"","line":109,"public":true,"protected":false,"private":false,"parameters":[{"name":"n","type":["number"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"within","static":false,"returns":{"types":["boolean"],"help":"True if a is <= tolerance of b."},"help":"Checks if two values are within the given tolerance of each other.","line":1305,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["number"],"help":"The first number to check","optional":false,"default":null},{"name":"b","type":["number"],"help":"The second number to check","optional":false,"default":null},{"name":"tolerance","type":["number"],"help":"The tolerance. Anything equal to or less than this is considered within the range.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"wrap","static":false,"returns":{"types":["number"],"help":"The wrapped value."},"help":"Ensures that the value always stays between min and max, by wrapping the value around.\\nmax should be larger than min, or the function will return 0.","line":614,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to wrap.","optional":false,"default":null},{"name":"min","type":["number"],"help":"The minimum the value is allowed to be.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum the value is allowed to be.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"wrapAngle","static":false,"returns":{"types":["number"],"help":"The new angle value, returns the same as the input angle if it was within bounds."},"help":"Keeps an angle value between -180 and +180.","line":843,"public":true,"protected":false,"private":false,"parameters":[{"name":"angle","type":["number"],"help":"The angle value to check","optional":false,"default":null},{"name":"radians","type":["boolean"],"help":"Set to `true` if the angle is given in radians, otherwise degrees is expected.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"wrapValue","static":false,"returns":{"types":["number"],"help":"The wrapped value."},"help":"Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around.\\nValues must be positive integers, and are passed through Math.abs.","line":644,"public":true,"protected":false,"private":false,"parameters":[{"name":"value","type":["number"],"help":"The value to add the amount to.","optional":false,"default":null},{"name":"amount","type":["number"],"help":"The amount to add to the value.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum the value is allowed to be.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[],"protected":[],"private":[]}}