Skip to content
IsaacShelton edited this page Nov 13, 2022 · 6 revisions

math

2.6/math.adept defines a commonly used math procedures.

Constant Expression Definitions

define E = 2.71828182845904523536028747135266249775724709369995957496696763
define PI = 3.14159265358979323846264338327950288419716939937510582097494459
define PHI = 1.61803398874989484820458683436563811772030917980576286213544862
define SQRT2 = 1.41421356237309504880168872420969807856967187537694807317667974

Functions

  • func max(a, b $T) $T

    Returns the larger of two values.

    [view src]

  • func max(a, b, c $T) $T

    Returns the largest of three values.

    [view src]

  • func min(a, b $T) $T

    Returns the smaller of two values.

    [view src]

  • func min(a, b, c $T) $T

    Returns the smallest of three values.

    [view src]

  • func clamp(value $T, min, max $~T) $T

    Returns a value clamped between min and max.

    [view src]

  • func distance(x1, y1, x2, y2 float) float

    Returns the distance between two points.

    [view src]

  • func distance(x1, y1, x2, y2 double) double

    Returns the distance between two points.

    [view src]

Other Symbols

Other symbols are imported indirectly from 2.6/cmath.adept

Clone this wiki locally