class Geo2D::Coordinate
- Geo2D::Coordinate
- Reference
- Object
Defined in:
geo2d/coordinate.crConstructors
Instance Method Summary
- #!=(coord : Coordinate) : Bool
-
#*(other : Coordinate)
Multiplication two points and return a new coordinate
-
#*(s : Float64)
Multiplication by Float64
-
#+(other : Coordinate)
Add two points to each other and return a new coordinate
-
#+(offset : Float64)
Operator + for offset addition
-
#-(other : Coordinate)
Subtract two points from each other and return a new coordinate
-
#-(offset : Float64)
Operator - for offset subtract
-
#/(s : Float64)
Division by Float64
-
#==(coord : Coordinate) : Bool
Checks for the equality of Coordinate
-
#angle
Angle from (0, 0) to coordinate
-
#angle_between(point1 : Coordinate, point2 : Coordinate)
The angle between two points using the current point as the center
-
#angle_to(point : Coordinate)
Returns angle To the coordinate
- #clone
-
#distance_to(point : Coordinate)
Calculate the distance between this coordinate and another coordinate
-
#dot(coord : Coordinate)
Dot product with other coordinate : return _x * coord._x + _y * coord._y
-
#flip_xy
Flips the x and y of Coordinate
-
#magnitude
Magnitude or length of the point relative to zero
-
#midpoint(other : Coordinate)
Midpoint between two coordinates
-
#mirror(axis1 : Coordinate, axis2 : Coordinate)
Mirror a coordinate axis1 : First point of line to be mirrored about axis2 : Second point of line to be mirrored about
-
#move(direction : Coordinate, d : Float64)
Move the coordinate by distance d over vector direction
-
#move_to(to : Coordinate, d : Float64)
Move the coordinate in the direction of point 'to' with distance d
-
#norm
Normalised version of this coordinate
-
#rotate(point : Coordinate, angle_vector : Coordinate)
Rotate around a point with a given angle vector
-
#rotate(point : Coordinate, angle : Float64)
Rotate around a point with a given angle
-
#rotate(angle_vector : Coordinate)
Rotate around (0.,0.) with a given angle vector
-
#rotate(angle : Float64)
Rotate around (0.,0.) with a given angle
-
#rotate_by_arc_length(point : Coordinate, length : Float64)
Around a point where the rotation described length is known
-
#scale(scale_center : Coordinate, scale_factor : Coordinate)
Scales this coordinate by the given factors with the given center
-
#scale(scale_factor : Float64)
Scales the coordinate by given factor with (0, 0) as center
-
#scale(scale_factor : Coordinate)
Scales the coordinate by given factors with (0, 0) as center
-
#squared
Squared of this Coordinate : return x * x + y * y
- #x : Float64
- #x=(x : Float64)
- #y : Float64
- #y=(y : Float64)
Constructor Detail
Instance Method Detail
The angle between two points using the current point as the center
Calculate the distance between this coordinate and another coordinate
Dot product with other coordinate : return _x * coord._x + _y * coord._y
Mirror a coordinate axis1 : First point of line to be mirrored about axis2 : Second point of line to be mirrored about
Move the coordinate by distance d over vector direction
Move the coordinate in the direction of point 'to' with distance d
Rotate around a point with a given angle vector
Around a point where the rotation described length is known
Scales this coordinate by the given factors with the given center