com.infomatiq.jsi
Class Point

java.lang.Object
  extended by com.infomatiq.jsi.Point

public class Point
extends Object

Currently hardcoded to 2 dimensions, but could be extended.


Field Summary
 float x
          The (x, y) coordinates of the point.
 float y
          The (x, y) coordinates of the point.
 
Constructor Summary
Point(float x, float y)
          Constructor.
 
Method Summary
 void set(Point other)
          Copy from another point into this one
 String toString()
          Print as a string in format "(x, y)"
 int xInt()
           
 int yInt()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public float x
The (x, y) coordinates of the point.


y

public float y
The (x, y) coordinates of the point.

Constructor Detail

Point

public Point(float x,
             float y)
Constructor.

Parameters:
x - The x coordinate of the point
y - The y coordinate of the point
Method Detail

set

public void set(Point other)
Copy from another point into this one


toString

public String toString()
Print as a string in format "(x, y)"

Overrides:
toString in class Object

xInt

public int xInt()
Returns:
X coordinate rounded to an int

yInt

public int yInt()
Returns:
Y coordinate rounded to an int


Copyright © 2012. All Rights Reserved.