Interface Point
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault doubleadd(double point) Adds the given point to this point.default doubleAdds the given point to this point.default doubledistance(double point) Returns the distance between this point and the given point.default doubleReturns the distance between this point and the given point.default doubledivide(double point) Divides this point by the given point.default doubleDivides this point by the given point.static IPoint2DfromDouble(double x, double z) Creates a 2d point from the given double values.static IPoint3DfromDouble(double x, double y, double z) Creates a 3d point from the given double values.static IPoint3DCreates a 3d point from a given X, Y, and Z value.static IPoint2DCreates a 2d point from a given X and Z value.doubleget()Returns the numerical representation of the point.default doubleinteg(double point, double subIntervals, DoubleUnaryOperator function) Returns the integral of the given function from this point to the given point.default doubleinteg(Point point, double subIntervals, DoubleUnaryOperator function) Returns the integral of the given function from this point to the given point.default doublemultiply(double point) Multiplies this point by the given point.default doubleMultiplies this point by the given point.default doublepower(double point) Returns this point raised to the power of the given point.default doubleReturns this point raised to the power of the given point.default doublesubtract(double point) Subtracts the given point from this point.default doubleSubtracts the given point from this point.toString()
-
Method Details
-
fromXZ
Creates a 2d point from a given X and Z value.- Parameters:
x- The X value.z- The Z value.- Returns:
- The 2d point.
-
fromXYZ
Creates a 3d point from a given X, Y, and Z value.- Parameters:
x- The X value.y- The Y value.z- The Z value.- Returns:
- The 3d point.
-
fromDouble
Creates a 2d point from the given double values.- Parameters:
x- The X value.z- The Z value.- Returns:
- The 2d point.
-
fromDouble
Creates a 3d point from the given double values.- Parameters:
x- The X value.y- The Y value.z- The Z value.- Returns:
- The 3d point.
-
toString
String toString() -
get
double get()Returns the numerical representation of the point.- Returns:
- The value of the point.
-
distance
default double distance(double point) Returns the distance between this point and the given point.- Parameters:
point- The point to compare to.- Returns:
- The distance between the two points.
-
distance
Returns the distance between this point and the given point.- Parameters:
point- The point to compare to.- Returns:
- The distance between the two points.
-
add
default double add(double point) Adds the given point to this point.- Parameters:
point- The point to add.- Returns:
- The sum of the two points.
-
add
Adds the given point to this point.- Parameters:
point- The point to add.- Returns:
- The sum of the two points.
-
subtract
default double subtract(double point) Subtracts the given point from this point.- Parameters:
point- The point to subtract.- Returns:
- The difference of the two points.
-
subtract
Subtracts the given point from this point.- Parameters:
point- The point to subtract.- Returns:
- The difference of the two points.
-
multiply
default double multiply(double point) Multiplies this point by the given point.- Parameters:
point- The point to multiply by.- Returns:
- The product of the two points.
-
multiply
Multiplies this point by the given point.- Parameters:
point- The point to multiply by.- Returns:
- The product of the two points.
-
divide
default double divide(double point) Divides this point by the given point.- Parameters:
point- The point to divide by.- Returns:
- The quotient of the two points.
-
divide
Divides this point by the given point.- Parameters:
point- The point to divide by.- Returns:
- The quotient of the two points.
-
power
default double power(double point) Returns this point raised to the power of the given point.- Parameters:
point- The point to raise this point to.- Returns:
- The power of the two points.
-
power
Returns this point raised to the power of the given point.- Parameters:
point- The point to raise this point to.- Returns:
- The power of the two points.
-
integ
Returns the integral of the given function from this point to the given point.- Parameters:
point- The point to integrate to.subIntervals- The number of sub-intervals to use.function- The function to integrate.- Returns:
- The integral of the function.
-
integ
Returns the integral of the given function from this point to the given point.- Parameters:
point- The point to integrate to.subIntervals- The number of sub-intervals to use.function- The function to integrate.- Returns:
- The integral of the function.
-