summaryrefslogtreecommitdiff
path: root/src/lib/math/fabs.go
blob: c0baa8956933827989a0b4ea8b38f2243962472b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package math

export func
fabs(arg float64) float64
{

	if arg < 0 {
		return -arg;
	}
	return arg;
}