struct CG2d::Line(T)
- CG2d::Line(T)
- Struct
- Value
- Object
Overview
T may be any subtype of Vec(T)
i.g. Line(Int32)
Defined in:
cg2d/line.crConstructors
Instance Method Summary
- #/(n : Float | Int)
- #bottom
- #contains_y?(y)
- #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 : Vec(T)
- #p1=(p1 : Vec(T))
- #p2 : Vec(T)
- #p2=(p2 : Vec(T))
- #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)