processing / processing/libprocessing
Add `random()` and `random_seed()`
還沒有人認領這個 Issue。
- 主要語言
- Rust
- 星號
- 69
- 分支
- 14
- 平均合併
- 15 天 22 小時
- 30 天內合併 PR
- 3
描述
From the random() reference page:
Generates random numbers. Each time the
random()function is called, it returns an unexpected value within the specified range. If only one parameter is passed to the function, it will return a float between zero and the value of the high parameter. For example,random(5)returns values between 0 and 5 (starting at zero, and up to, but not including, 5).If two parameters are specified, the function will return a float with a value between the two values. For example,
random(-5, 10.2)returns values starting at -5 and up to (but not including) 10.2. To convert a floating-point random number to an integer, use theint()function.
From the randomSeed() reference page:
Sets the seed value for
random(). By default, random() produces different results each time the program is run. Set the seed parameter to a constant to return the same pseudo-random numbers each time the software is run.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先從 issue 中連結的 random() 和 randomSeed() 參考頁面開始,然後在 libprocessing 中找到對應的 Processing API 入口點。依照文件實作這兩個函式,使其具備一個參數和兩個參數時的行為,並產生使用種子時的確定性輸出,然後驗證所得的 API 與這些範例一致。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust
- 領域
- api
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100