mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
merge revision(s) r46780: [Backport #9499]
* lib/matrix.rb: Fix sign for cross_product [#9499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@46789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
068a7dff12
commit
feea0a9e82
4 changed files with 15 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue