MMMATH.INT 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMMath;
  26. {$I COMPILER.INC}
  27. interface
  28. const
  29. M_PI = 3.14159265358979323846;
  30. M2_PI = 2 * M_PI;
  31. function MinR(a, b: extended): extended;
  32. function MaxR(a, b: extended): extended;
  33. function MinMaxR(x, min, max: extended): extended;
  34. function LimitR(x, min, max: extended): extended;
  35. function ModR(x,y: extended): extended;
  36. function ArcCos(x: extended): extended; { IN: |X| <= 1 OUT: [0..PI] radians }
  37. function ArcSin(x: extended): extended; { IN: |X| <= 1 OUT: [-PI/2..PI/2] radians }
  38. function ArcTan2(y, x: extended): extended;
  39. function Tan(x: extended): extended;
  40. function Cotan(x: extended): extended; { 1 / tan(X), X <> 0 }
  41. function Ceil(x: extended): longint;
  42. function Floor(x: extended): Longint;
  43. function Log(x: extended): extended;
  44. function Log2(x: extended): extended;
  45. function Log10(x: extended): extended;
  46. function Pow(x,n: extended): extended;
  47. implementation