shithub: purgatorio

ref: 00c219c7d9c2b9f60c2db0e1ba7289b2301209a7
dir: /libmath/fdim.c/

View raw version
#include "lib9.h"
#include "mathi.h"

double
fdim(double x, double y)
{
	if(x>y)
		return x-y;
	else
		return 0;
}

double
fmax(double x, double y)
{
	if(x>y)
		return x;
	else
		return y;
}

double
fmin(double x, double y)
{
	if(x<y)
		return x;
	else
		return y;
}