java api: fixed ctor in RotatedRect, added 114 tests by Hussein Abdinoor

This commit is contained in:
Kirill Kornyakov
2011-07-22 12:47:11 +00:00
parent 2bc9bca349
commit 1098566a2f
4 changed files with 1446 additions and 233 deletions

View File

@@ -8,7 +8,9 @@ public class RotatedRect {
public double angle;
public RotatedRect() {
this.angle=0;
this.center = new Point();
this.size = new Size();
this.angle = 0;
}
public RotatedRect(Point c, Size s, double a) {
@@ -21,6 +23,7 @@ public class RotatedRect {
this();
set(vals);
}
public void set(double[] vals) {
if(vals!=null) {
center.x = vals.length>0 ? (int)vals[0] : 0;
@@ -73,12 +76,10 @@ public class RotatedRect {
return r;
}
public RotatedRect clone() {
return new RotatedRect(center, size, angle);
}
@Override
public int hashCode() {
final int prime = 31;