Exemple #1
0
// Subtract returns a - b.
//
func (context *Context) Subtract(a Quad, b Quad) (r Quad) {
	var result C.Ret_decQuad_t
	assert_sane(context)

	result = C.mdq_subtract(a.val, b.val, context.set)

	context.set = result.set
	return Quad{val: result.val}
}
Exemple #2
0
// Sub returns a - b.
//
func (a Quad) Sub(b Quad) Quad {

	return Quad(C.mdq_subtract(C.struct_Quad(a), C.struct_Quad(b)))
}