~ubuntu-branches/ubuntu/maverick/cdk/maverick

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/graph/rebond/Point.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Revision: 7740 $ $Author: egonw $ $Date: 2007-01-20 14:51:41 +0100 (Sat, 20 Jan 2007) $
 
2
 *
 
3
 * Copyright (C) 2003-2007  Miguel Howard <miguel@jmol.org>
 
4
 *
 
5
 * Contact: cdk-devel@lists.sf.net
 
6
 *
 
7
 *  This library is free software; you can redistribute it and/or
 
8
 *  modify it under the terms of the GNU Lesser General Public
 
9
 *  License as published by the Free Software Foundation; either
 
10
 *  version 2.1 of the License, or (at your option) any later version.
 
11
 *
 
12
 *  This library is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 *  Lesser General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU Lesser General Public
 
18
 *  License along with this library; if not, write to the Free Software
 
19
 *  Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 
 
20
 */
 
21
package org.openscience.cdk.graph.rebond;
 
22
 
 
23
 
 
24
/**
 
25
 * @author      Miguel Howard
 
26
 * @cdk.created 2003-05
 
27
 * @cdk.module  standard
 
28
 */
 
29
public class Point implements Bspt.Tuple {
 
30
  double x;
 
31
  double y;
 
32
  double z;
 
33
 
 
34
  public Point(double x, double y, double z) {
 
35
    this.x = x;
 
36
    this.y = y;
 
37
    this.z = z;
 
38
  }
 
39
 
 
40
  public double getDimValue(int dim) {
 
41
    if (dim == 0)
 
42
      return x;
 
43
    if (dim == 1)
 
44
      return y;
 
45
    return z;
 
46
  }
 
47
 
 
48
  public String toString() {
 
49
    return "<" + x + "," + y + "," + z + ">";
 
50
  }
 
51
}