OlaP.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _OlaP_h_
  2. #define _OlaP_h_
  3. /* OlaP.h
  4. *
  5. * Copyright (C) 2007-2008 Ola Söder
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /*
  21. * os 20080529 Initial release
  22. */
  23. /////////////////////////////////////////
  24. // Macros //
  25. /////////////////////////////////////////
  26. #define OlaSWAP(TYPE, X, Y) {TYPE temp = X; X = Y; Y = temp;}
  27. #define OlaMAX(x,y) ((x) > (y) ? (x) : (y))
  28. #define OlaMIN(x,y) ((x) < (y) ? (x) : (y))
  29. #define OlaSQUARE(x) ((x) * (x))
  30. /////////////////////////////////////////
  31. // DEBUG //
  32. /////////////////////////////////////////
  33. /////////////////////////////////////////
  34. // Misc defines //
  35. /////////////////////////////////////////
  36. #define kOla_MINFLOAT 0.0000000000000000000001
  37. #endif /* _Misc_h_ */