Confusing example for PVector copy() method
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
Issue にリンクされている PVector copy() のリファレンスページから始め、その Examples セクションを見つけてください。例のオブジェクト初期化とコピー代入を確認し、その後、冗長な初期化を行わないように例を更新してください。変更後に、レンダリングされたドキュメントの例を確認してください。
索引モデルが issue の本文から書いたものです。
説明
Select the type of content error.
Other content error (please specify)
Section
Examples
Location of the error
https://processing.org/reference/PVector_copy_.html
Describe the error
In the documentation for the copy() method of the PVector class, the following code example is given:
PVector v1, v2;
void setup() {
size(100, 100);
v1 = new PVector(20.0, 30.0, 40.0);
v2 = new PVector();
v2 = v1.copy();
...
While not a factual error, it seems curious to me that v2 would be instantiated as a new PVector only to be assigned the result of v1.copy(). If .copy() creates a returns a new PVector object, then the initial assignment would have no effect. This led to some confusion amongst my students who had various incorrect assumptions about how .copy() works given the example code.
Suggested correction
PVector v1, v2;
void setup() {
size(100, 100);
v1 = new PVector(20.0, 30.0, 40.0);
v2 = v1.copy();
...
Language
No response
Screenshots or references
No response
Additional context
No response
- 主要言語
- MDX
- スター
- 90
- フォーク
- 122
- 平均マージ
- 1時間 43分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
processing/processing-website のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
processing/processing-website#716 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
processing/processing-website#703 ·
-
Good First Issue Help Wanted Reference
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
processing/processing-website#698 · コメント 5 件 · リアクション 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
processing/processing-website#681 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
processing/processing-website#646 · コメント 3 件 ·
processing/processing-website の issue をすべて見る
似ている issue
-
Add: hunch オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AbdelStark/awesome-typesafe#104 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
A11y ♿️
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Link Checker Report オープンautomated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
documentation improve or update documentation priority/low triage
難易度 2/5 半日 初心者へのやさしさ 86/100
warpdotdev/docs#782 · コメント 1 件 ·