Many javadoc fixes thanks to Celtic Minstrel
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -21,6 +21,7 @@ public class BlockVector extends Vector {
|
||||
|
||||
/**
|
||||
* Construct the vector with another vector.
|
||||
* @param vec The other vector.
|
||||
*/
|
||||
public BlockVector(Vector vec) {
|
||||
this.x = vec.getX();
|
||||
@@ -31,9 +32,9 @@ public class BlockVector extends Vector {
|
||||
/**
|
||||
* Construct the vector with provided integer components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public BlockVector(int x, int y, int z) {
|
||||
this.x = x;
|
||||
@@ -44,9 +45,9 @@ public class BlockVector extends Vector {
|
||||
/**
|
||||
* Construct the vector with provided double components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public BlockVector(double x, double y, double z) {
|
||||
this.x = x;
|
||||
@@ -57,9 +58,9 @@ public class BlockVector extends Vector {
|
||||
/**
|
||||
* Construct the vector with provided float components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public BlockVector(float x, float y, float z) {
|
||||
this.x = x;
|
||||
@@ -70,7 +71,7 @@ public class BlockVector extends Vector {
|
||||
/**
|
||||
* Checks if another object is equivalent.
|
||||
*
|
||||
* @param obj
|
||||
* @param obj The other object
|
||||
* @return whether the other object is equivalent
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -38,9 +38,9 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Construct the vector with provided integer components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public Vector(int x, int y, int z) {
|
||||
this.x = x;
|
||||
@@ -51,9 +51,9 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Construct the vector with provided double components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public Vector(double x, double y, double z) {
|
||||
this.x = x;
|
||||
@@ -64,9 +64,9 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Construct the vector with provided float components.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param x X component
|
||||
* @param y Y component
|
||||
* @param z Z component
|
||||
*/
|
||||
public Vector(float x, float y, float z) {
|
||||
this.x = x;
|
||||
@@ -75,9 +75,9 @@ public class Vector implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the vector by another.
|
||||
* Adds a vector to this one
|
||||
*
|
||||
* @param vec
|
||||
* @param vec The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector add(Vector vec) {
|
||||
@@ -88,9 +88,9 @@ public class Vector implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtracts the vector by another.
|
||||
* Subtracts a vector from this one.
|
||||
*
|
||||
* @param vec
|
||||
* @param vec The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector subtract(Vector vec) {
|
||||
@@ -103,7 +103,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Multiplies the vector by another.
|
||||
*
|
||||
* @param vec
|
||||
* @param vec The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector multiply(Vector vec) {
|
||||
@@ -116,7 +116,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Divides the vector by another.
|
||||
*
|
||||
* @param vec
|
||||
* @param vec The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector divide(Vector vec) {
|
||||
@@ -129,7 +129,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Copies another vector
|
||||
*
|
||||
* @param vec
|
||||
* @param vec The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector copy(Vector vec) {
|
||||
@@ -168,6 +168,7 @@ public class Vector implements Cloneable {
|
||||
* will be returned if the inner result of the sqrt() function overflows,
|
||||
* which will be caused if the distance is too long.
|
||||
*
|
||||
* @param o The other vector
|
||||
* @return the distance
|
||||
*/
|
||||
public double distance(Vector o) {
|
||||
@@ -177,6 +178,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Get the squared distance between this vector and another.
|
||||
*
|
||||
* @param o The other vector
|
||||
* @return the distance
|
||||
*/
|
||||
public double distanceSquared(Vector o) {
|
||||
@@ -186,7 +188,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the angle between this vector and another in radians.
|
||||
*
|
||||
* @param other
|
||||
* @param other The other vector
|
||||
* @return angle in radians
|
||||
*/
|
||||
public float angle(Vector other) {
|
||||
@@ -198,7 +200,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Sets this vector to the midpoint between this vector and another.
|
||||
*
|
||||
* @param other
|
||||
* @param other The other vector
|
||||
* @return this same vector (now a midpoint)
|
||||
*/
|
||||
public Vector midpoint(Vector other) {
|
||||
@@ -211,7 +213,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets a new midpoint vector between this vector and another.
|
||||
*
|
||||
* @param other
|
||||
* @param other The other vector
|
||||
* @return a new midpoint vector
|
||||
*/
|
||||
public Vector getMidpoint(Vector other) {
|
||||
@@ -224,7 +226,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Performs scalar multiplication, multiplying all components with a scalar.
|
||||
*
|
||||
* @param m
|
||||
* @param m The factor
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector multiply(int m) {
|
||||
@@ -237,7 +239,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Performs scalar multiplication, multiplying all components with a scalar.
|
||||
*
|
||||
* @param m
|
||||
* @param m The factor
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector multiply(double m) {
|
||||
@@ -250,7 +252,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Performs scalar multiplication, multiplying all components with a scalar.
|
||||
*
|
||||
* @param m
|
||||
* @param m The factor
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector multiply(float m) {
|
||||
@@ -264,7 +266,7 @@ public class Vector implements Cloneable {
|
||||
* Calculates the dot product of this vector with another. The dot product
|
||||
* is defined as x1*x2+y1*y2+z1*z2. The returned value is a scalar.
|
||||
*
|
||||
* @param other
|
||||
* @param other The other vector
|
||||
* @return dot product
|
||||
*/
|
||||
public double dot(Vector other) {
|
||||
@@ -279,7 +281,7 @@ public class Vector implements Cloneable {
|
||||
* y = z1 * x2 - z2 * x1<br/>
|
||||
* z = x1 * y2 - x2 * y1
|
||||
*
|
||||
* @param o
|
||||
* @param o The other vector
|
||||
* @return the same vector
|
||||
*/
|
||||
public Vector crossProduct(Vector o) {
|
||||
@@ -325,8 +327,8 @@ public class Vector implements Cloneable {
|
||||
* The minimum and maximum vectors given must be truly the minimum and
|
||||
* maximum X, Y and Z components.
|
||||
*
|
||||
* @param min
|
||||
* @param max
|
||||
* @param min Minimum vector
|
||||
* @param max Maximum vector
|
||||
* @return whether this vector is in the AABB
|
||||
*/
|
||||
public boolean isInAABB(Vector min, Vector max) {
|
||||
@@ -336,8 +338,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Returns whether this vector is within a sphere.
|
||||
*
|
||||
* @param origin
|
||||
* @param radius
|
||||
* @param origin Sphere origin.
|
||||
* @param radius Sphere radius
|
||||
* @return whether this vector is in the sphere
|
||||
*/
|
||||
public boolean isInSphere(Vector origin, double radius) {
|
||||
@@ -347,7 +349,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the X component.
|
||||
*
|
||||
* @return
|
||||
* @return The X component.
|
||||
*/
|
||||
public double getX() {
|
||||
return x;
|
||||
@@ -366,7 +368,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the Y component.
|
||||
*
|
||||
* @return
|
||||
* @return The Y component.
|
||||
*/
|
||||
public double getY() {
|
||||
return y;
|
||||
@@ -385,7 +387,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the Z component.
|
||||
*
|
||||
* @return
|
||||
* @return The Z component.
|
||||
*/
|
||||
public double getZ() {
|
||||
return z;
|
||||
@@ -404,8 +406,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the X component.
|
||||
*
|
||||
* @param x
|
||||
* @return x
|
||||
* @param x The new X component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setX(int x) {
|
||||
this.x = x;
|
||||
@@ -415,8 +417,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the X component.
|
||||
*
|
||||
* @param x
|
||||
* @return x
|
||||
* @param x The new X component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setX(double x) {
|
||||
this.x = x;
|
||||
@@ -426,8 +428,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the X component.
|
||||
*
|
||||
* @param x
|
||||
* @return x
|
||||
* @param x The new X component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setX(float x) {
|
||||
this.x = x;
|
||||
@@ -437,8 +439,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Y component.
|
||||
*
|
||||
* @param y
|
||||
* @return y
|
||||
* @param y The new Y component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setY(int y) {
|
||||
this.y = y;
|
||||
@@ -448,8 +450,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Y component.
|
||||
*
|
||||
* @param y
|
||||
* @return y
|
||||
* @param y The new Y component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setY(double y) {
|
||||
this.y = y;
|
||||
@@ -459,8 +461,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Y component.
|
||||
*
|
||||
* @param y
|
||||
* @return y
|
||||
* @param y The new Y component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setY(float y) {
|
||||
this.y = y;
|
||||
@@ -470,8 +472,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Z component.
|
||||
*
|
||||
* @param z
|
||||
* @return z
|
||||
* @param z The new Z component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setZ(int z) {
|
||||
this.z = z;
|
||||
@@ -481,8 +483,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Z component.
|
||||
*
|
||||
* @param z
|
||||
* @return z
|
||||
* @param z The new Z component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setZ(double z) {
|
||||
this.z = z;
|
||||
@@ -492,8 +494,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Set the Z component.
|
||||
*
|
||||
* @param z
|
||||
* @return z
|
||||
* @param z The new Z component.
|
||||
* @return This vector.
|
||||
*/
|
||||
public Vector setZ(float z) {
|
||||
this.z = z;
|
||||
@@ -565,7 +567,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets a Location version of this vector with yaw and pitch being 0.
|
||||
*
|
||||
* @param world
|
||||
* @param world The world to link the location to.
|
||||
* @return the location
|
||||
*/
|
||||
public Location toLocation(World world) {
|
||||
@@ -575,7 +577,9 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets a Location version of this vector.
|
||||
*
|
||||
* @param world
|
||||
* @param world The world to link the location to.
|
||||
* @param yaw The desired yaw.
|
||||
* @param pitch The desired pitch.
|
||||
* @return the location
|
||||
*/
|
||||
public Location toLocation(World world, float yaw, float pitch) {
|
||||
@@ -585,7 +589,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Get the block vector of this vector.
|
||||
*
|
||||
* @return
|
||||
* @return A block vector.
|
||||
*/
|
||||
public BlockVector toBlockVector() {
|
||||
return new BlockVector(x, y, z);
|
||||
@@ -594,7 +598,7 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Get the threshold used for equals().
|
||||
*
|
||||
* @return
|
||||
* @return The epsilon.
|
||||
*/
|
||||
public static double getEpsilon() {
|
||||
return epsilon;
|
||||
@@ -603,8 +607,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the minimum components of two vectors.
|
||||
*
|
||||
* @param v1
|
||||
* @param v2
|
||||
* @param v1 The first vector.
|
||||
* @param v2 The second vector.
|
||||
* @return minimum
|
||||
*/
|
||||
public static Vector getMinimum(Vector v1, Vector v2) {
|
||||
@@ -614,8 +618,8 @@ public class Vector implements Cloneable {
|
||||
/**
|
||||
* Gets the maximum components of two vectors.
|
||||
*
|
||||
* @param v1
|
||||
* @param v2
|
||||
* @param v1 The first vector.
|
||||
* @param v2 The second vector.
|
||||
* @return maximum
|
||||
*/
|
||||
public static Vector getMaximum(Vector v1, Vector v2) {
|
||||
@@ -626,7 +630,7 @@ public class Vector implements Cloneable {
|
||||
* Gets a random vector with components having a random value between
|
||||
* 0 and 1.
|
||||
*
|
||||
* @return
|
||||
* @return A random vector.
|
||||
*/
|
||||
public static Vector getRandom() {
|
||||
return new Vector(random.nextDouble(), random.nextDouble(), random.nextDouble());
|
||||
|
||||
@@ -127,7 +127,7 @@ public class Configuration extends ConfigurationNode {
|
||||
/**
|
||||
* Return the set header.
|
||||
*
|
||||
* @return
|
||||
* @return The header comment.
|
||||
*/
|
||||
public String getHeader() {
|
||||
return header;
|
||||
@@ -136,7 +136,6 @@ public class Configuration extends ConfigurationNode {
|
||||
/**
|
||||
* Saves the configuration to disk. All errors are clobbered.
|
||||
*
|
||||
* @param header header to prepend
|
||||
* @return true if it was successful
|
||||
*/
|
||||
public boolean save() {
|
||||
@@ -184,7 +183,7 @@ public class Configuration extends ConfigurationNode {
|
||||
/**
|
||||
* This method returns an empty ConfigurationNode for using as a
|
||||
* default in methods that select a node from a node list.
|
||||
* @return
|
||||
* @return The empty node.
|
||||
*/
|
||||
public static ConfigurationNode getEmptyNode() {
|
||||
return new ConfigurationNode(new HashMap<String, Object>());
|
||||
|
||||
@@ -107,8 +107,8 @@ public class ConfigurationNode {
|
||||
* Set the property at a location. This will override existing
|
||||
* configuration data to have it conform to key/value mappings.
|
||||
*
|
||||
* @param path
|
||||
* @param value
|
||||
* @param path The property path
|
||||
* @param value The new value
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setProperty(String path, Object value) {
|
||||
@@ -450,7 +450,7 @@ public class ConfigurationNode {
|
||||
* path does not lead to a node, null will be returned. A node has
|
||||
* key/value mappings.
|
||||
*
|
||||
* @param path
|
||||
* @param path The property path
|
||||
* @return node or null
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -560,7 +560,7 @@ public class ConfigurationNode {
|
||||
* Remove the property at a location. This will override existing
|
||||
* configuration data to have it conform to key/value mappings.
|
||||
*
|
||||
* @param path
|
||||
* @param path The property path
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void removeProperty(String path) {
|
||||
|
||||
@@ -350,10 +350,10 @@ public class SimplexNoiseGenerator extends PerlinNoiseGenerator {
|
||||
/**
|
||||
* Computes and returns the 4D simplex noise for the given coordinates in 4D space
|
||||
*
|
||||
* @param xin X coordinate
|
||||
* @param yin Y coordinate
|
||||
* @param zin Z coordinate
|
||||
* @param win W coordinate
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param w W coordinate
|
||||
* @return Noise at given location, from range -1 to 1
|
||||
*/
|
||||
public double noise(double x, double y, double z, double w) {
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SimplexOctaveGenerator extends OctaveGenerator {
|
||||
* @param x X-coordinate
|
||||
* @param y Y-coordinate
|
||||
* @param z Z-coordinate
|
||||
* @para, w W-coordinate
|
||||
* @param w W-coordinate
|
||||
* @param frequency How much to alter the frequency by each octave
|
||||
* @param amplitude How much to alter the amplitude by each octave
|
||||
* @return Resulting noise
|
||||
@@ -85,7 +85,7 @@ public class SimplexOctaveGenerator extends OctaveGenerator {
|
||||
* @param x X-coordinate
|
||||
* @param y Y-coordinate
|
||||
* @param z Z-coordinate
|
||||
* @para, w W-coordinate
|
||||
* @param w W-coordinate
|
||||
* @param frequency How much to alter the frequency by each octave
|
||||
* @param amplitude How much to alter the amplitude by each octave
|
||||
* @param normalized If true, normalize the value to [-1, 1]
|
||||
|
||||
Reference in New Issue
Block a user