nf() function description inadequate
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 55/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
研究方向
開啟 processing.org/reference/nf_.html 中受影響的 nf() 參考頁面,並檢視目前的描述以及 Syntax 和 Parameter 區段。釐清 float 和 array 輸入的不同呼叫形式與必要參數。當初學者能夠判斷每種輸入類型適用哪個簽名時,這項工作就完成了。
由索引模型根據 Issue 內容生成。
描述
Issue description
nf() function reference could use a better description. As of now the text says:
Utility function for formatting numbers into strings. There are two versions: one for formatting floats, and one for formatting ints. The values for the digits and right parameters should always be positive integers. The left parameter should be positive or 0. If it is zero, only the right side is formatted.
This text only states that an int and a float version is existent. Nowhere is it explained how those are different. Referring to this description a call like nf(float, int) would be valid. This call however is not functional as passing num as a float variable requires to specify a left and right parameter (so the call has to be nf(float, int, int)).
This could be confusing to beginner programmers.
URL(s) of affected page(s)
https://processing.org/reference/nf_.html
Proposed fix
In my opinion ideally, in line with single responsibility, these would be two functions.
However an extended description should also do the trick.
The text could be extended by a paragraph similar to:
When num is a variable of type float the call becomes
nf(num, left, right). left represents the formatted number left of the decimal point and right represents the formatting right of the decimal point.
Alternatively it could be made clear in the Syntax and Parameter section which call allows which parameters.
nf(numf, left, right)
nf(numsf, left, right)
numf = float: the number to format
numsf = float[]: the numbers to format
- 主要語言
- MDX
- 星號
- 90
- 分支
- 122
- 平均合併
- 1 小時 20 分鐘
- 30 天內合併 PR
- 4
環境準備
我們還沒有檢查這個專案的環境設定檔。先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
processing/processing-website 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
processing/processing-website#716 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
processing/processing-website#703 ·
維護者通常 1 天內回覆
-
Good First Issue Help Wanted Reference
難度 1/5 1 小時以內 新手友好度 90/100
processing/processing-website#698 · 5 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 72/100
processing/processing-website#681 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
processing/processing-website#646 · 3 則留言 ·
維護者通常 1 天內回覆
查看 processing/processing-website 的全部 Issue
相似的 Issue
-
sync-en
難度 1/5 1-3 小時 新手友好度 88/100
維護者通常 2 天內回覆
-
external
難度 2/5 1-3 小時 新手友好度 68/100
langchain-ai/docs#6255 ·
維護者通常 1 天內回覆
-
detectors enhancement good first issue
難度 2/5 1-3 小時 新手友好度 86/100
SM260845/readme-gen#1 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
angular/angularfire#3774 ·
維護者通常 2 天內回覆
-
good first issue help wanted opensource september
難度 1/5 1 小時以內 新手友好度 88/100