Back to project page dice-probabilities.
The source code is released under:
MIT License
If you think the Android project dice-probabilities listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.kleemann.diceprobabilities.graph; //ww w. j av a2s . com /** * <p>A simple Point class with float values. */ class Point { private final float x; private final float y; public Point(float x, float y) { this.x = x; this.y = y; } public float getX() { return x; } public float getY() { return y; } public Point add(Point that) { return new Point(x+that.x, y+that.y); } public Point sub(Point that) { return new Point(x-that.x, y-that.y); } public Point mid(Point that) { return new Point( (x+that.x)/2.0f, (y+that.y)/2.0f ); } @Override public String toString() { return "("+x+","+y+")"; } }