1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/matrix.rb: Fix sign for cross_product [#9499]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2014-07-11 05:19:33 +00:00
parent 9412551ee2
commit 72d0536606
3 changed files with 12 additions and 3 deletions

View file

@ -146,4 +146,9 @@ class TestVector < Test::Unit::TestCase
v = Vector[Rational(1,2), 0]
assert_equal(0.5, v.norm)
end
def test_cross_product
v = Vector[1, 0, 0].cross_product Vector[0, 1, 0]
assert_equal(Vector[0, 0, 1], v)
end
end