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
-
难度 2/5 1-3 小时 新手友好度 68/100
obra/superpowers#2422 ·
维护者通常 6 天内回复
-
triage
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
AdobeDocs/workfront.en#69 ·
-
integration: water_heater
难度 2/5 1-3 小时 新手友好度 68/100
home-assistant/home-assistant.io#48527 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bytedance/trae-agent#532 · 2 条评论 ·
维护者通常 1 天内回复