513 |
public int hashCode() |
public int hashCode() |
514 |
{ |
{ |
515 |
// Talk about a fun time reverse engineering this one! |
// Talk about a fun time reverse engineering this one! |
516 |
long l = Double.doubleToLongBits(getX()) |
long l = java.lang.Double.doubleToLongBits(getX()) |
517 |
+ 37 * Double.doubleToLongBits(getY()) |
+ 37 * java.lang.Double.doubleToLongBits(getY()) |
518 |
+ 43 * Double.doubleToLongBits(getWidth()) |
+ 43 * java.lang.Double.doubleToLongBits(getWidth()) |
519 |
+ 47 * Double.doubleToLongBits(getHeight()); |
+ 47 * java.lang.Double.doubleToLongBits(getHeight()); |
520 |
return (int) ((l >> 32) ^ l); |
return (int) ((l >> 32) ^ l); |
521 |
} |
} |
522 |
|
|
791 |
} |
} |
792 |
|
|
793 |
/** |
/** |
794 |
|
* Create a rectangle with the given values. |
795 |
|
* |
796 |
|
* @param x the x coordinate |
797 |
|
* @param y the y coordinate |
798 |
|
* @param w the width |
799 |
|
* @param h the height |
800 |
|
*/ |
801 |
|
Float(double x, double y, double w, double h) |
802 |
|
{ |
803 |
|
this.x = (float) x; |
804 |
|
this.y = (float) y; |
805 |
|
width = (float) w; |
806 |
|
height = (float) h; |
807 |
|
} |
808 |
|
|
809 |
|
/** |
810 |
* Return the X coordinate. |
* Return the X coordinate. |
811 |
* |
* |
812 |
* @return the value of x |
* @return the value of x |