Class: Sunniesnow::Tools::SvgPath::Line
- Inherits:
-
PathSegment
- Object
- PathSegment
- Sunniesnow::Tools::SvgPath::Line
- Defined in:
- lib/sscharter/tools/svg_path.rb
Instance Attribute Summary collapse
- #begin ⇒ Vector2D readonly
- #end ⇒ Vector2D readonly
- #length ⇒ Float readonly
Instance Method Summary collapse
- #at(t) ⇒ Vector2D
- #at_length(s) ⇒ Vector2D
-
#initialize(begin_point, end_point) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(begin_point, end_point) ⇒ Line
Returns a new instance of Line.
133 134 135 136 137 |
# File 'lib/sscharter/tools/svg_path.rb', line 133 def initialize begin_point, end_point @begin = begin_point @end = end_point @length = (@end - @begin).length end |
Instance Attribute Details
#begin ⇒ Vector2D (readonly)
123 124 125 |
# File 'lib/sscharter/tools/svg_path.rb', line 123 def begin @begin end |
#end ⇒ Vector2D (readonly)
126 127 128 |
# File 'lib/sscharter/tools/svg_path.rb', line 126 def end @end end |
#length ⇒ Float (readonly)
129 130 131 |
# File 'lib/sscharter/tools/svg_path.rb', line 129 def length @length end |