~ojwb/survex/master

« back to all changes in this revision

Viewing changes to src/vector3.cc

  • Committer: Olly Betts
  • Date: 2010-06-18 07:16:42 UTC
  • mfrom: (2003.1.853)
  • Revision ID: git-v1:75fe355c16c77b1090c4426a3dc0b8dabca31904
Rename branches/survex-1_1 to trunk.

git-svn-id: file:///home/survex-svn/survex/trunk@3454 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
//  C++ class for 3-element vectors
5
5
//
6
6
//  Copyright (C) 2000-2001, Mark R. Shinwell.
7
 
//  Copyright (C) 2002 Olly Betts
 
7
//  Copyright (C) 2002-2003 Olly Betts
8
8
//
9
9
//  This program is free software; you can redistribute it and/or modify
10
10
//  it under the terms of the GNU General Public License as published by
18
18
//
19
19
//  You should have received a copy of the GNU General Public License
20
20
//  along with this program; if not, write to the Free Software
21
 
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
22
//
23
23
 
24
24
#ifdef HAVE_CONFIG_H
62
62
    return *this;
63
63
}
64
64
 
 
65
Vector3& Vector3::operator+=(const Vector3 &v)
 
66
{
 
67
    x += v.x;
 
68
    y += v.y;
 
69
    z += v.z;
 
70
 
 
71
    return *this;
 
72
}
 
73
 
 
74
Vector3& Vector3::operator-=(const Vector3 &v)
 
75
{
 
76
    x -= v.x;
 
77
    y -= v.y;
 
78
    z -= v.z;
 
79
 
 
80
    return *this;
 
81
}
 
82
 
65
83
Vector3 operator*(const double f, const Vector3& v)
66
84
{
67
85
    Vector3 o;