예제 #1
0
파일: float.go 프로젝트: jamesadney/gmp
// Abs sets z to the absolute value of x and returns z.
func (f *Float) Abs(x *Float) *Float {
	x.doinit()
	f.doinit()
	C.mpf_abs(&f.i[0], &x.i[0])
	return f
}
예제 #2
0
파일: gmp.go 프로젝트: swantescholz/coding
// Abs sets z to the absolute value of x and returns z.
func (f *Float) Abs(x *Float) *Float {
	C.mpf_abs(&f.i[0], &x.i[0])
	return f
}