An extension class for h2d.col.Ray.

Available since

0.1.0

.

See also:

Static methods

staticinlinecheckRay(ray1:Ray, ray2:Ray):Null<Point>

Returns a point where ray1 and ray2 intersects.

staticinlineproject(ray:Ray, p:Point):Point

Returns the projection of a point onto a ray.

Parameters:

ray

An h2d.col.Ray to project onto.

p

An h2d.col.Point to project.

Returns:

A new h2d.col.Point instance being the projection of p onto ray.

staticinlineside(ray:Ray, p:Point):Float

Returns a number depending on which side a point is on a ray axis.

Parameters:

ray

An h2d.col.Ray instance.

p

An h2d.col.Point instance.

Returns:

A positive number if p is on the right side of ray and negative if it's on the left.

staticinlinetoString(ray:Ray):String

Returns the string representation of a ray in the format: [{[ray.x],[ray.y]};{[ray.xDir],[ray.yDir]}].