summaryrefslogtreecommitdiff
path: root/freebsdtvision/lib/TPoint.cc
blob: b971f6ec2d19002442598a6f64b3a0dd18d4bcdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * TPoint.cc
 *
 * Turbo Vision - Version 2.0
 *
 * Copyright (c) 1994 by Borland International
 * All Rights Reserved.
 *
 * Modified by Sergio Sigala <sergio@sigala.it>
 */

#define Uses_TPoint
#include <tvision/tv.h>

TPoint operator - ( const TPoint& one, const TPoint& two )
{
    TPoint result;
    result.x = one.x - two.x;
    result.y = one.y - two.y;
    return result;
}

TPoint operator + ( const TPoint& one, const TPoint& two )
{
    TPoint result;
    result.x = one.x + two.x;
    result.y = one.y + two.y;
    return result;
}

int operator == ( const TPoint& one, const TPoint& two )
{
    return one.x == two.x && one.y == two.y;
}

int operator!= ( const TPoint& one, const TPoint& two )
{
    return one.x != two.x || one.y != two.y;
}