From 3707779899b76421bf10d38e7e84588a37455a80 Mon Sep 17 00:00:00 2001 From: gogotanaka Date: Thu, 9 Oct 2014 12:29:09 -0700 Subject: [PATCH] Give alias for Vector's product --- lib/matrix.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/matrix.rb b/lib/matrix.rb index b39973b..26b375f 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -1944,6 +1944,7 @@ class Vector } p end + alias :dot :inner_product # # Returns the cross product of this vector with the other. @@ -1955,6 +1956,7 @@ class Vector v[0]*@elements[2] - v[2]*@elements[0], v[1]*@elements[0] - v[0]*@elements[1] ] end + alias :cross :cross_product # # Like Array#collect. -- 1.8.5.2 (Apple Git-48)