Example #1
0
// Min returns the smaller of a and b.
// If either a or b is NaN then the other argument is the result.
//
func (context *Context) Min(a Quad, b Quad) (r Quad) {
	var result C.Ret_decQuad_t
	assert_sane(context)

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

	context.set = result.set
	return Quad{val: result.val}
}
Example #2
0
// Min returns the smaller of a and b.
// If either a or b is NaN then the other argument is the result.
//
func Min(a Quad, b Quad) Quad {

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