{"ast":null,"code":"/**\r\n * @author       <NAME> <<EMAIL>>\r\n * @copyright    2019 Photon Storm Ltd.\r\n * @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\nvar Point = require('../point/Point');\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\n\n\nvar Random = function Random(line, out) {\n  if (out === undefined) {\n    out = new Point();\n  }\n\n  var t = Math.random();\n  out.x = line.x1 + t * (line.x2 - line.x1);\n  out.y = line.y1 + t * (line.y2 - line.y1);\n  return out;\n};\n\nmodule.exports = Random;","map":null,"metadata":{},"sourceType":"script"}