home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tv20os2.zip / src / TPoint.cpp < prev    next >
C/C++ Source or Header  |  1998-01-19  |  764b  |  40 lines

  1. /*
  2.  * TPoint.cc
  3.  *
  4.  * Turbo Vision - Version 2.0
  5.  *
  6.  * Copyright (c) 1994 by Borland International
  7.  * All Rights Reserved.
  8.  *
  9.  * Modified by Sergio Sigala <ssigala@globalnet.it>
  10.  */
  11.  
  12. #define Uses_TPoint
  13. #include <tvision/tv.h>
  14.  
  15. TPoint operator - ( const TPoint& one, const TPoint& two )
  16. {
  17.     TPoint result;
  18.     result.x = one.x - two.x;
  19.     result.y = one.y - two.y;
  20.     return result;
  21. }
  22.  
  23. TPoint operator + ( const TPoint& one, const TPoint& two )
  24. {
  25.     TPoint result;
  26.     result.x = one.x + two.x;
  27.     result.y = one.y + two.y;
  28.     return result;
  29. }
  30.  
  31. int operator == ( const TPoint& one, const TPoint& two )
  32. {
  33.     return one.x == two.x && one.y == two.y;
  34. }
  35.  
  36. int operator!= ( const TPoint& one, const TPoint& two )
  37. {
  38.     return one.x != two.x || one.y != two.y;
  39. }
  40.