예제 #1
0
파일: float.go 프로젝트: jamesadney/gmp
// SetInt sets f = x and returns f.
func (f *Float) SetInt64(x int64) *Float {
	f.doinit()
	C.mpf_set_si(&f.i[0], C.long(x))
	return f
}
예제 #2
0
파일: gmp.go 프로젝트: swantescholz/coding
// SetInt sets f = x and returns f.
func (f *Float) SetSint(x int) *Float {
	C.mpf_set_si(&f.i[0], C.long(x))
	return f
}