EasyGeometry::D2::Ray
A Ray is a semi-line in the space with a source point and a direction. Segment inherit from Linear Entity.
#contains?(entity)
Is other GeometryEntity contained in this Ray?
Returns:
true
ifentity
is in this Ray.false
otherwise.
#distance(point)
Finds the shortest distance between the ray
and a point
.
#==(other)
Returns True
if self
and other
are the same mathematical entities.
#source
The point
from which the ray
emanates.
#xdirection
The x direction of the ray
.
Returns:
Positive infinity
if the ray points in thepositive
x directionNegative infinity
if the ray points in thenegative
x direction0
if the ray isvertical
#ydirection
The y direction of the ray
.
Returns:
Positive infinity
if the ray points in thepositive
y directionNegative infinity
if the ray points in thenegative
y direction0
if the ray ishorizontal
Last updated
Was this helpful?