processing / processing/processing4
PVector angleBetween returns 0 when x and y of either parameter are both 0
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 494
- フォーク
- 183
- 平均マージ
- 4時間 39分
- マージ済み PR(30日)
- 3
説明
I found an existing report describing similar behavior with 3D PVectors (https://github.com/processing/processing/issues/2045), but it appears the same problem affects 2D PVectors as well.
When either the start or end PVector is (0,0) the output of angleBetween() is always 0.
I'm not particularly experienced with Processing, so it's entirely possible that I'm misunderstanding something or using the API incorrectly. I tend to pick it up every few months for small projects and then promptly forget most of what I learned.
That said, I've spent some time testing this behavior and looking into the implementation, and based on what I found, I would not expect the angle to be 0 in the cases I tested.
Edit: I forgot to add, I'm using processing 4.5.2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
PVector.angleBetween() のエントリーポイントから始め、issue #2045 の関連する 3D レポートと 2D の動作を比較してください。どちらか一方のベクトルが (0,0) の場合に期待される結果を明確にし、その後、それらのケースに対するリグレッションカバレッジで修正後の動作を検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 56/100