From: mail@... Date: 2014-10-29T21:56:01+00:00 Subject: [ruby-core:66005] [ruby-trunk - Feature #10442] Helper methods to Vector class Issue #10442 has been updated by gogo tanaka. @Egunov Dmitriy I like this idea, and it looks fine for me. It may too trivial things but I want more tests and to make it more gracefully. (`1.5707963267948966` is little bit not clear) Anyway, I respect for your work. thanks. ``` assert_in_epsilon(Math::PI/2, Vector[1, 0].angle_with(Vector[0, 1])) assert_in_epsilon(Math::PI/4, Vector[1, 1].angle_with(Vector[0, 1])) ``` ---------------------------------------- Feature #10442: Helper methods to Vector class https://bugs.ruby-lang.org/issues/10442#change-49731 * Author: Egunov Dmitriy * Status: Open * Priority: Normal * Assignee: Marc-Andre Lafortune * Category: lib * Target version: ---------------------------------------- Vector class missed some very helpful methods like angle between another vector and vector projection. Patch attached. Please advice if more unit tests are needed. ---Files-------------------------------- vector_helpers.patch (1.44 KB) angle_with.patch (1.12 KB) -- https://bugs.ruby-lang.org/