From: ruby-core@... Date: 2014-10-29T02:52:51+00:00 Subject: [ruby-core:65969] [ruby-trunk - Feature #10074] [PATCH] generalize Vector#cross_product Issue #10074 has been updated by Marc-Andre Lafortune. I committed this change, with a couple of changes. In particular, the sign was wrong for even dimensions. I changed it so we now have, for any `n`: first, *middle, last = Matrix.identity(n).column_vectors first.cross(*middle) == last Thanks for this feature request! ---------------------------------------- Feature #10074: [PATCH] generalize Vector#cross_product https://bugs.ruby-lang.org/issues/10074#change-49704 * Author: gogo tanaka * Status: Assigned * Priority: Normal * Assignee: Marc-Andre Lafortune * Category: lib * Target version: current: 2.2.0 ---------------------------------------- Usually We use cross_product in only 3 dimensions. Sometimes we want to handle cross_product in n-dimensions. But I recognize Ruby should be not for mathematician but rubyist. Ruby doesn't need too academic method. So If you think it is too academic you can ignore my patches. ---Files-------------------------------- generalize_Vector#cross_product.patch (1.71 KB) -- https://bugs.ruby-lang.org/