Model a Point in a 2D Space.
- Value parameters:
- x
the x coordinate
- y
the Y coordinate
- Companion:
- object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Value members
Concrete methods
@targetName("product")
Extension method from Space
Product operator.
Product operator.
- Value parameters:
- other
the other point involved in the operation
- Returns:
the multiplication of the two points.
@targetName("plus")
Extension method from Space
Plus operator.
Plus operator.
- Value parameters:
- other
the other point to sum with
- Returns:
the sum of the two points.
@targetName("minus")
Extension method from Space
Minus operator.
Minus operator.
- Value parameters:
- other
the other point involved in the operation
- Returns:
the difference of the two points
Extension method from Space
Get the distance between the current and the provided point.
Get the distance between the current and the provided point.
- Value parameters:
- other
the point to witch compute the distance
- Returns:
the distance from the point.