1/* 2 * Copyright 2002-2007, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Author: 6 * Daniel Reinhold, danielre@users.sf.net 7 */ 8 9 10#include <stdlib.h> 11 12 13int 14abs(int i) 15{ 16 return (i < 0) ? -i : i; 17} 18 19 20long 21labs(long i) 22{ 23 return (i < 0) ? -i : i; 24} 25 26 27long long 28llabs(long long i) 29{ 30 return (i < 0) ? -i : i; 31} 32