1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 01:12:52 +00:00

Service improvements

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-16 13:41:55 -03:00
parent adb285fdf9
commit 4952a6a47b
52 changed files with 1099 additions and 296 deletions

View File

@@ -16,8 +16,6 @@
*/
package com.l2jserver.util.dimensional;
import org.apache.commons.math.geometry.Rotation;
/**
* An point is composed of an Coordinate and an angle. The angle represents the
* facing angle of the point, that is, the direction the point is "looking".
@@ -30,9 +28,9 @@ public class Point {
*/
protected final Coordinate coordinate;
/**
* Te point rotation
* The point angle
*/
protected final Rotation rotation;
protected final double angle;
/**
* Creates a new point
@@ -44,7 +42,7 @@ public class Point {
*/
public Point(Coordinate coordinate, double angle) {
this.coordinate = coordinate;
this.rotation = new Rotation(coordinate.vector, angle);
this.angle = angle;
}
/**
@@ -93,21 +91,9 @@ public class Point {
/**
* @return the angle
* @see org.apache.commons.math.geometry.Rotation#getAngle()
*/
public double getAngle() {
return rotation.getAngle();
}
/**
* @param other
* the other point
* @return the angle difference between the two points
* @see org.apache.commons.math.geometry.Rotation#distance(Rotation,
* Rotation)
*/
public double getAngleDifference(Point other) {
return Rotation.distance(this.rotation, other.rotation);
return angle;
}
/**
@@ -117,13 +103,6 @@ public class Point {
return coordinate;
}
/**
* @return the rotation
*/
public Rotation getRotation() {
return rotation;
}
/**
* Creates a new instance from the 3 points and an angle
*