~ubuntu-branches/ubuntu/quantal/python-demgengeo/quantal

« back to all changes in this revision

Viewing changes to util/vector3.cc

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2011-11-18 21:47:18 UTC
  • Revision ID: package-import@ubuntu.com-20111118214718-4ysqm3dhpqwdd7gd
Tags: upstream-0.99~bzr106
ImportĀ upstreamĀ versionĀ 0.99~bzr106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////
 
2
//                                                         //
 
3
// Copyright (c) 2007-2011 by The University of Queensland //
 
4
// Earth Systems Science Computational Centre (ESSCC)      //
 
5
// http://www.uq.edu.au/esscc                              //
 
6
//                                                         //
 
7
// Primary Business: Brisbane, Queensland, Australia       //
 
8
// Licensed under the Open Software License version 3.0    //
 
9
// http://www.opensource.org/licenses/osl-3.0.php          //
 
10
//                                                         //
 
11
/////////////////////////////////////////////////////////////
 
12
 
 
13
#include "vector3.h"
 
14
#include "vector3.hh"
 
15
 
 
16
const Vector3 Vector3::ZERO = Vector3(0.0, 0.0, 0.0);
 
17
 
 
18
bool Vector3::operator<(const Vector3& rhs) const
 
19
{
 
20
  bool res;
 
21
 
 
22
  if(data[0]!=rhs.data[0]) {
 
23
    res=data[0]<rhs.data[0];
 
24
  } else if(data[1]!=rhs.data[1]){
 
25
    res=data[1]<rhs.data[1];
 
26
  } else if(data[2]!=rhs.data[2]){
 
27
    res=data[2]<rhs.data[2];
 
28
  } else {
 
29
    res=false;
 
30
  }
 
31
 
 
32
  return res;
 
33
}