processing / processing/libprocessing

Add `random()` and `random_seed()`

オープン
#141 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

api c-pyo3 needs-discussion
主要言語
Rust
スター
69
フォーク
14
平均マージ
15日 22時間
マージ済み PR(30日)
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 the int() 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue にリンクされている random()randomSeed() のリファレンスページから始め、次に libprocessing 内で対応する Processing API のエントリーポイントを見つけます。ドキュメントに記載された1引数および2引数の動作と、シード指定時の決定論的な出力を備えるように両方の関数を実装し、結果の API がこれらの例と一致することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
api
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。