aboutsummaryrefslogtreecommitdiffstats
path: root/test/matrix
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-11 05:19:33 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-11 05:19:33 +0000
commit72d05366066176f73d7199da67036c4f8778595a (patch)
treedc5ecc605e3aed4e188fba95bfadc3fe8cf6a9ae /test/matrix
parent9412551ee298619d827f892baad58c6a7687f017 (diff)
downloadruby-72d05366066176f73d7199da67036c4f8778595a.tar.gz
* 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
Diffstat (limited to 'test/matrix')
-rw-r--r--test/matrix/test_vector.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/matrix/test_vector.rb b/test/matrix/test_vector.rb
index 18660df574..ced774c490 100644
--- a/test/matrix/test_vector.rb
+++ b/test/matrix/test_vector.rb
@@ -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