[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:66005] [ruby-trunk - Feature #10442] Helper methods to Vector class

From: mail@...
Date: 2014-10-29 21:56:01 UTC
List: ruby-core #66005
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/

In This Thread

Prev Next