Jump to content

Find the intersection of two lines: Difference between revisions

m
→‎{{header|Ruby}}: no more + -20
(→‎Using a geometric algebra library: narrowing is actually not needed here)
m (→‎{{header|Ruby}}: no more + -20)
Line 2,270:
 
def to_s
"y = #{@a}x #{@b.positive? ? '+' : '-'} #{@b.abs}"
end
 
Line 2,281:
</syntaxhighlight>
{{out}}
<pre>Line y = 5.0x + - 20.0 intersects line y = 0.4x + 3.0 at #<struct Point x=5.0, y=5.0>.</pre>
 
=={{header|Rust}}==
1,149

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.