/* * utils.c * * Utility stuff * * (c) 2006-2009 Thomas White * * pattern_sim - Simulate diffraction patterns from small crystals * */ #include #include #include "utils.h" /* Return the MOST POSITIVE of two numbers */ unsigned int biggest(signed int a, signed int b) { if ( a>b ) { return a; } return b; } /* Return the LEAST POSITIVE of two numbers */ unsigned int smallest(signed int a, signed int b) { if ( a 0 ) return +1; return 0; }