aboutsummaryrefslogtreecommitdiffstats
path: root/src/zcmp.c
blob: 55caa6b12f7f5ae6b16e95341af7a7a85d19e93b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* See LICENSE file for copyright and license details. */
#include "internals.h"


int
zcmp(z_t a, z_t b)
{
	if (zsignum(a) != zsignum(b))
		return zsignum(a) < zsignum(b) ? -1 : zsignum(a) > zsignum(b);
	return zsignum(a) * zcmpmag(a, b);
}