Exemple #1
0
Fichier : rat.go Projet : ncw/gmp
// Set sets z to x (by making a copy of x) and returns z.
func (z *Rat) Set(x *Rat) *Rat {
	if z != x {
		z.doinit()
		C.mpq_set(&z.i[0], &x.i[0])
	}
	return z
}
Exemple #2
0
// Set sets z = x and returns z.
func (q *Rat) Set(x *Rat) *Rat {
	q.doinit()
	C.mpq_set(&q.i[0], &x.i[0])
	return q
}