struct PF2d::Line(T)
- PF2d::Line(T)
- Struct
- Value
- Object
Overview
Represents a line between two points
Line(Vec(Int32, 2))
Defined in:
pf2d/line.crConstructors
Macro Summary
Instance Method Summary
- #/(n : Float | Int)
- #bottom
- #contains_y?(y)
-
#intersects?(other : Line(T)) : Vec2(Float64) | Nil
Return the point where the two lines would intersect unless parallel
- #inv_slope
- #left
-
#length
Return the length of the line
-
#lerp(t : Float64)
Linearly interpolate
-
#normal
Find the normal axis to this line
-
#normal_cc
Normal counter clockwise
- #p1 : T
- #p1=(p1 : T)
- #p2 : T
- #p2=(p2 : T)
- #point_pointers
- #right
-
#rise
The height from the starting point to the ending point
-
#run
The length from the starting point to the ending point
- #slope
-
#to_vector
Convert this line into a normalized vector
- #top
- #x_at(y)
- #y_at(x)
Constructor Detail
Macro Detail
Instance Method Detail
Return the point where the two lines would intersect unless parallel