spirograph
Class Util
java.lang.Object
spirograph.Util
- public abstract class Util
- extends java.lang.Object
Field Summary |
static java.lang.String |
JAVAC
|
static int |
SUCCESS
|
Constructor Summary |
Util()
|
Method Summary |
static double |
dist(double ax,
double ay,
double bx,
double by)
This method calculates the distance between any two points in 2D space |
static boolean |
inEllipse(double x,
double y,
double a,
double b)
This method calculate whether or not a given position is inside a
given ellipse. |
static java.lang.String |
readFile(java.lang.String filename)
This method reads the specified file off of the current directory
and returns it as a String. |
static void |
writeFile(java.lang.String filename,
java.lang.String message)
This routine takes a String and writes it to a file in the current
directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUCCESS
public static final int SUCCESS
- See Also:
- Constant Field Values
JAVAC
public static final java.lang.String JAVAC
- See Also:
- Constant Field Values
Util
public Util()
readFile
public static java.lang.String readFile(java.lang.String filename)
- This method reads the specified file off of the current directory
and returns it as a String.
writeFile
public static void writeFile(java.lang.String filename,
java.lang.String message)
- This routine takes a String and writes it to a file in the current
directory. If the file already exists it is overwritten.
dist
public static double dist(double ax,
double ay,
double bx,
double by)
- This method calculates the distance between any two points in 2D space
inEllipse
public static boolean inEllipse(double x,
double y,
double a,
double b)
- This method calculate whether or not a given position is inside a
given ellipse.