Gomathmath.Abs

Returns the absolute value of x.

문법

math.Abs(x float64) float64

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

fmt
Println
math
fmt.Println(math.Abs(-3.14)) // 3.14