Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 10
math
IsaacShelton edited this page Nov 13, 2022
·
6 revisions
2.7/math.adept defines a commonly used math procedures.
define E = 2.71828182845904523536028747135266249775724709369995957496696763
define PI = 3.14159265358979323846264338327950288419716939937510582097494459
define PHI = 1.61803398874989484820458683436563811772030917980576286213544862
define SQRT2 = 1.41421356237309504880168872420969807856967187537694807317667974
func max(a, b $T) $TReturns the larger of two values.
func max(a, b, c $T) $TReturns the largest of three values.
func min(a, b $T) $TReturns the smaller of two values.
func min(a, b, c $T) $TReturns the smallest of three values.
func clamp(value $T, min, max $~T) $TReturns a value clamped between
minandmax.func distance(x1, y1, x2, y2 float) floatReturns the distance between two points.
func distance(x1, y1, x2, y2 double) doubleReturns the distance between two points.
Other symbols are imported indirectly from 2.7/cmath.adept