Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for computing the hypotenuse using the alpha max plus beta min algorithm.

Hierarchy

  • Hypot

Callable

  • __call(x: number, y: number): number

Index

Methods

Methods

factory

  • factory(alpha: number, beta: number, nonnegative?: undefined | false | true, ints?: undefined | false | true): HypotFunction
  • Returns a function to compute a hypotenuse using the alpha max plus beta min algorithm.

    Parameters

    • alpha: number

      alpha

    • beta: number

      beta

    • Optional nonnegative: undefined | false | true

      boolean indicating whether input values are always nonnegative

    • Optional ints: undefined | false | true

      boolean indicating whether input values are always 32-bit integers

    Returns HypotFunction

    function to compute a hypotenuse

    Example

    var hypot = ampbm.factory( 1.0, 0.5 );
    // returns <Function>
    
    var h = hypot( -5.0, 12.0 );
    // returns 14.5