Ejemplo n.º 1
0
func ptr2poly(cpoly unsafe.Pointer) Poly {
	count := int(C.lenPoly(cpoly))
	poly := make([]Gd, count)
	for i := 0; i < count; i++ {
		m := C.getPoly(cpoly, C.int(i))
		poly[i] = Gd{
			int(C.getG(m)),
			int(C.getD(m)),
		}
	}
	return Poly(poly)
}
Ejemplo n.º 2
0
func ptr2gd(cgd unsafe.Pointer) Gd {
	return Gd{
		int(C.getG(cgd)),
		int(C.getD(cgd)),
	}
}