shithub: riscv

ref: 717237303d368378283ad719ee4f2c580b99fd2b
dir: /sys/src/libc/port/abs.c/

View raw version
#include <u.h>
#include <libc.h>

int
abs(int a)
{
	if(a < 0)
		return -a;
	return a;
}

long
labs(long a)
{
	if(a < 0)
		return -a;
	return a;
}