Module: Determinator
- Included in:
- Cartesius::Circumference, Cartesius::Ellipse, Cartesius::Hyperbola
- Defined in:
- lib/cartesius/determinator.rb
Instance Method Summary collapse
Instance Method Details
#center ⇒ Object
3 4 5 6 7 8 |
# File 'lib/cartesius/determinator.rb', line 3 def center Cartesius::Point.new( x: Rational(-@x_coeff, (2 * @x2_coeff)), y: Rational(-@y_coeff, (2 * @y2_coeff)) ) end |
#to_equation ⇒ Object
10 11 12 13 14 |
# File 'lib/cartesius/determinator.rb', line 10 def to_equation equationfy( 'x^2' => @x2_coeff, 'y^2' => @y2_coeff, 'x' => @x_coeff, 'y' => @y_coeff, '1' => @k_coeff ) end |