export default Utils;
declare namespace Utils {
    /**
     * Returns the original value if it is inclusively within the [max,min] range. If it's below the range, min is
     * returned, and if it's above the range, max is returned.
     * @public
     *
     * @param {number} value
     * @param {number} min
     * @param {number} max
     * @returns {number}
     */
    function clamp(value: number, min: number, max: number): number;
    /**
     * Returns a number in the range $n\in[\mathrm{min},\mathrm{max})$ with the same equivalence class as the input
     * value mod (max-min), i.e. for a value $m$, $m\equiv n\ (\mathrm{mod}\ \mathrm{max}-\mathrm{min})$.
     * @public
     *
     * The 'down' indicates that if the value is equal to min or max, the max is returned.
     *
     * @param {number} value
     * @param {number} min
     * @param {number} max
     * @returns {number}
     */
    function moduloBetweenDown(value: number, min: number, max: number): number;
    /**
     * Returns a number in the range $n\in(\mathrm{min},\mathrm{max}]$ with the same equivalence class as the input
     * value mod (max-min), i.e. for a value $m$, $m\equiv n\ (\mathrm{mod}\ \mathrm{max}-\mathrm{min})$.
     * @public
     *
     * The 'up' indicates that if the value is equal to min or max, the min is returned.
     *
     * @param {number} value
     * @param {number} min
     * @param {number} max
     * @returns {number}
     */
    function moduloBetweenUp(value: number, min: number, max: number): number;
    /**
     * Returns an array of integers from A to B (inclusive), e.g. rangeInclusive( 4, 7 ) maps to [ 4, 5, 6, 7 ].
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @returns {Array.<number>}
     */
    function rangeInclusive(a: number, b: number): Array<number>;
    /**
     * Returns an array of integers from A to B (exclusive), e.g. rangeExclusive( 4, 7 ) maps to [ 5, 6 ].
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @returns {Array.<number>}
     */
    function rangeExclusive(a: number, b: number): Array<number>;
    /**
     * Converts degrees to radians.
     * @public
     *
     * @param {number} degrees
     * @returns {number}
     */
    function toRadians(degrees: number): number;
    /**
     * Converts radians to degrees.
     * @public
     *
     * @param {number} radians
     * @returns {number}
     */
    function toDegrees(radians: number): number;
    /**
     * Workaround for broken modulo operator.
     * E.g. on iOS9, 1e10 % 1e10 -> 2.65249474e-315
     * See https://github.com/phetsims/dot/issues/75
     * @param {number} a
     * @param {number} b
     * @returns {number}
     */
    function mod(a: number, b: number): number;
    /**
     * Greatest Common Divisor, using https://en.wikipedia.org/wiki/Euclidean_algorithm. See
     * https://en.wikipedia.org/wiki/Greatest_common_divisor
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @returns {number}
     */
    function gcd(a: number, b: number): number;
    /**
     * Least Common Multiple, https://en.wikipedia.org/wiki/Least_common_multiple
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @returns {number} lcm, an integer
     */
    function lcm(a: number, b: number): number;
    /**
     * Intersection point between the lines defined by the line segments p1-p2 and p3-p4. If the
     * lines are not properly defined, null is returned. If there are no intersections or infinitely many,
     * e.g. parallel lines, null is returned.
     * @public
     *
     * @param {Vector2} p1
     * @param {Vector2} p2
     * @param {Vector2} p3
     * @param {Vector2} p4
     * @returns {Vector2|null}
     */
    function lineLineIntersection(p1: Vector2, p2: Vector2, p3: Vector2, p4: Vector2): Vector2 | null;
    /**
     * Returns the center of a circle that will lie on 3 points (if it exists), otherwise null (if collinear).
     * @public
     *
     * @param {Vector2} p1
     * @param {Vector2} p2
     * @param {Vector2} p3
     * @returns {Vector2|null}
     */
    function circleCenterFromPoints(p1: Vector2, p2: Vector2, p3: Vector2): Vector2 | null;
    /**
     * Returns whether the point p is inside the circle defined by the other three points (p1, p2, p3).
     * @public
     *
     * NOTE: p1,p2,p3 should be specified in a counterclockwise (mathematically) order, and thus should have a positive
     * signed area.
     *
     * See notes in https://en.wikipedia.org/wiki/Delaunay_triangulation.
     *
     * @param {Vector2} p1
     * @param {Vector2} p2
     * @param {Vector2} p3
     * @param {Vector2} p
     * @returns {boolean}
     */
    function pointInCircleFromPoints(p1: Vector2, p2: Vector2, p3: Vector2, p: Vector2): boolean;
    /**
     * Ray-sphere intersection, returning information about the closest intersection. Assumes the sphere is centered
     * at the origin (for ease of computation), transform the ray to compensate if needed.
     * @public
     *
     * If there is no intersection, null is returned. Otherwise an object will be returned like:
     * <pre class="brush: js">
     * {
     *   distance: {number}, // distance from the ray position to the intersection
     *   hitPoint: {Vector3}, // location of the intersection
     *   normal: {Vector3}, // the normal of the sphere's surface at the intersection
     *   fromOutside: {boolean}, // whether the ray intersected the sphere from outside the sphere first
     * }
     * </pre>
     *
     * @param {number} radius
     * @param {Ray3} ray
     * @param {number} epsilon
     * @returns {Object}
     */
    function sphereRayIntersection(radius: number, ray: Ray3, epsilon: number): Object;
    /**
     * Returns an array of the real roots of the quadratic equation $ax + b=0$, or null if every value is a solution.
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @returns {Array.<number>|null} - The real roots of the equation, or null if all values are roots. If the root has
     *                                  a multiplicity larger than 1, it will be repeated that many times.
     */
    function solveLinearRootsReal(a: number, b: number): Array<number> | null;
    /**
     * Returns an array of the real roots of the quadratic equation $ax^2 + bx + c=0$, or null if every value is a
     * solution. If a is nonzero, there should be between 0 and 2 (inclusive) values returned.
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @param {number} c
     * @returns {Array.<number>|null} - The real roots of the equation, or null if all values are roots. If the root has
     *                                  a multiplicity larger than 1, it will be repeated that many times.
     */
    function solveQuadraticRootsReal(a: number, b: number, c: number): Array<number> | null;
    /**
     * Returns an array of the real roots of the cubic equation $ax^3 + bx^2 + cx + d=0$, or null if every value is a
     * solution. If a is nonzero, there should be between 0 and 3 (inclusive) values returned.
     * @public
     *
     * @param {number} a
     * @param {number} b
     * @param {number} c
     * @param {number} d
     * @param {number} [discriminantThreshold] - for determining whether we have a single real root
     * @returns {Array.<number>|null} - The real roots of the equation, or null if all values are roots. If the root has
     *                                  a multiplicity larger than 1, it will be repeated that many times.
     */
    function solveCubicRootsReal(a: number, b: number, c: number, d: number, discriminantThreshold?: number | undefined): Array<number> | null;
    /**
     * Returns the unique real cube root of x, such that $y^3=x$.
     * @public
     *
     * @param {number} x
     * @returns {number}
     */
    function cubeRoot(x: number): number;
    /**
     * Defines and evaluates a linear mapping. The mapping is defined so that $f(a_1)=b_1$ and $f(a_2)=b_2$, and other
     * values are interpolated along the linear equation. The returned value is $f(a_3)$.
     * @public
     *
     * @param {number} a1
     * @param {number} a2
     * @param {number} b1
     * @param {number} b2
     * @param {number} a3
     * @returns {number}
     */
    function linear(a1: number, a2: number, b1: number, b2: number, a3: number): number;
    /**
     * Rounds using "Round half away from zero" algorithm. See dot#35.
     * @public
     *
     * JavaScript's Math.round is not symmetric for positive and negative numbers, it uses IEEE 754 "Round half up".
     * See https://en.wikipedia.org/wiki/Rounding#Round_half_up.
     * For sims, we want to treat positive and negative values symmetrically, which is IEEE 754 "Round half away from zero",
     * See https://en.wikipedia.org/wiki/Rounding#Round_half_away_from_zero
     *
     * Note that -0 is rounded to 0, since we typically do not want to display -0 in sims.
     *
     * @param {number} value                               `
     * @returns {number}
     */
    function roundSymmetric(value: number): number;
    /**
     * A predictable implementation of toFixed.
     * @public
     *
     * JavaScript's toFixed is notoriously buggy, behavior differs depending on browser,
     * because the spec doesn't specify whether to round or floor.
     * Rounding is symmetric for positive and negative values, see Utils.roundSymmetric.
     *
     * @param {number} value
     * @param {number} decimalPlaces
     * @returns {string}
     */
    function toFixed(value: number, decimalPlaces: number): string;
    /**
     * A predictable implementation of toFixed, where the result is returned as a number instead of a string.
     * @public
     *
     * JavaScript's toFixed is notoriously buggy, behavior differs depending on browser,
     * because the spec doesn't specify whether to round or floor.
     * Rounding is symmetric for positive and negative values, see Utils.roundSymmetric.
     *
     * @param {number} value
     * @param {number} decimalPlaces
     * @returns {number}
     */
    function toFixedNumber(value: number, decimalPlaces: number): number;
    /**
     * Returns true if two numbers are within epsilon of each other.
     *
     * @param {number} a
     * @param {number} b
     * @param {number} epsilon
     * @returns {boolean}
     */
    function equalsEpsilon(a: number, b: number, epsilon: number): boolean;
    /**
     * Computes the intersection of the two line segments $(x_1,y_1)(x_2,y_2)$ and $(x_3,y_3)(x_4,y_4)$. If there is no
     * intersection, null is returned.
     * @public
     *
     * @param {number} x1
     * @param {number} y1
     * @param {number} x2
     * @param {number} y2
     * @param {number} x3
     * @param {number} y3
     * @param {number} x4
     * @param {number} y4
     * @returns {Vector2|null}
     */
    function lineSegmentIntersection(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x4: number, y4: number): Vector2 | null;
    /**
     * Squared distance from a point to a line segment squared.
     * See http://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment
     * @public
     *
     * @param {Vector2} point - The point
     * @param {Vector2} a - Starting point of the line segment
     * @param {Vector2} b - Ending point of the line segment
     * @returns {number}
     */
    function distToSegmentSquared(point: Vector2, a: Vector2, b: Vector2): number;
    /**
     * distance from a point to a line segment squared.
     * @public
     *
     * @param {Vector2} point - The point
     * @param {Vector2} a - Starting point of the line segment
     * @param {Vector2} b - Ending point of the line segment
     * @returns {number}
     */
    function distToSegment(point: Vector2, a: Vector2, b: Vector2): number;
    /**
     * Determines whether the three points are approximately collinear.
     * @public
     *
     * @param {Vector2} a
     * @param {Vector2} b
     * @param {Vector2} c
     * @param {number} [epsilon]
     * @returns {boolean}
     */
    function arePointsCollinear(a: Vector2, b: Vector2, c: Vector2, epsilon?: number | undefined): boolean;
    /**
     * The area inside the triangle defined by the three vertices.
     * @public
     *
     * @param {Vector2} a
     * @param {Vector2} b
     * @param {Vector2} c
     * @returns {number}
     */
    function triangleArea(a: Vector2, b: Vector2, c: Vector2): number;
    /**
     * The area inside the triangle defined by the three vertices, but with the sign determined by whether the vertices
     * provided are clockwise or counter-clockwise.
     * @public
     *
     * If the vertices are counterclockwise (in a right-handed coordinate system), then the signed area will be
     * positive.
     *
     * @param {Vector2} a
     * @param {Vector2} b
     * @param {Vector2} c
     * @returns {number}
     */
    function triangleAreaSigned(a: Vector2, b: Vector2, c: Vector2): number;
    /**
     * Returns the centroid of the simple planar polygon using Green's Theorem P=-y/2, Q=x/2 (similar to how kite
     * computes areas). See also https://en.wikipedia.org/wiki/Shoelace_formula.
     * @public
     *
     * @param {Array.<Vector2>} vertices
     * @returns {Vector2}
     */
    function centroidOfPolygon(vertices: Array<Vector2>): Vector2;
    /**
     * Function that returns the hyperbolic cosine of a number
     * @public
     *
     * @param {number} value
     * @returns {number}
     */
    function cosh(value: number): number;
    /**
     * Function that returns the hyperbolic sine of a number
     * @public
     *
     * @param {number} value
     * @returns {number}
     */
    function sinh(value: number): number;
    /**
     * Log base-10, since it wasn't included in every supported browser.
     * @public
     *
     * @param {number} val
     * @returns {number}
     */
    function log10(val: number): number;
    /**
     * Generates a random Gaussian sample with the given mean and standard deviation.
     * This method relies on the "static" variables generate, z0, and z1 defined above.
     * Random.js is the primary client of this function, but it is defined here so it can be
     * used other places more easily if need be.
     * Code inspired by example here: https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform.
     * @public
     *
     * @param {number} mu - The mean of the Gaussian
     * @param {number} sigma - The standard deviation of the Gaussian
     * @param {Random} random - the source of randomness
     * @returns {number}
     */
    function boxMullerTransform(mu: number, sigma: number, random: Random): number;
    /**
     * Determines the number of decimal places in a value.
     * @public
     *
     * @param {number} value - a finite number, scientific notation is not supported for decimal numbers
     * @returns {number}
     */
    function numberOfDecimalPlaces(value: number): number;
    /**
     * Rounds a value to a multiple of a specified interval.
     * Examples:
     * roundToInterval( 0.567, 0.01 ) -> 0.57
     * roundToInterval( 0.567, 0.02 ) -> 0.56
     * roundToInterval( 5.67, 0.5 ) -> 5.5
     *
     * @param {number} value
     * @param {number} interval
     * @returns {number}
     */
    function roundToInterval(value: number, interval: number): number;
}
import Vector2 from './Vector2.js';
//# sourceMappingURL=Utils.d.ts.map