diff options
author | Kevin Rushforth <[email protected]> | 2005-10-17 23:09:50 +0000 |
---|---|---|
committer | Kevin Rushforth <[email protected]> | 2005-10-17 23:09:50 +0000 |
commit | bbbd3f78002273305ea08e3b5b151e4203759a36 (patch) | |
tree | b9554a90f634be9148b490ac79e5939c10743115 /src/javax/vecmath/Point2i.java | |
parent | 61ffc4dc377385a64aacb8070876bbae4c0bd348 (diff) |
Merged changes from dev-1_4 branch into the main trunk.
NOTE: all 1.4 development will now proceed on the main trunk. The dev-1_4 branch is closed.
git-svn-id: https://svn.java.net/svn/vecmath~svn/trunk@55 dd45e54d-f42e-c781-df72-dca083a658b1
Diffstat (limited to 'src/javax/vecmath/Point2i.java')
-rw-r--r-- | src/javax/vecmath/Point2i.java | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/javax/vecmath/Point2i.java b/src/javax/vecmath/Point2i.java new file mode 100644 index 0000000..945e6a9 --- /dev/null +++ b/src/javax/vecmath/Point2i.java @@ -0,0 +1,64 @@ +/* + * $RCSfile$ + * + * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. + * + * Use is subject to license terms. + * + * $Revision$ + * $Date$ + * $State$ + */ + +package javax.vecmath; + +import java.lang.Math; + +/** + * A 2-element point represented by signed integer x,y + * coordinates. + * + * @since vecmath 1.4 + */ +public class Point2i extends Tuple2i implements java.io.Serializable { + + static final long serialVersionUID = 9208072376494084954L; + + /** + * Constructs and initializes a Point2i from the specified + * x and y coordinates. + * @param x the x coordinate + * @param y the y coordinate + */ + public Point2i(int x, int y) { + super(x, y); + } + + + /** + * Constructs and initializes a Point2i from the array of length 2. + * @param t the array of length 2 containing x and y in order. + */ + public Point2i(int[] t) { + super(t); + } + + + /** + * Constructs and initializes a Point2i from the specified Tuple2i. + * @param t1 the Tuple2i containing the initialization x and y + * data. + */ + public Point2i(Tuple2i t1) { + super(t1); + } + + + /** + * Constructs and initializes a Point2i to (0,0). + */ + public Point2i() { + super(); + } + +} |