processing / processing/libprocessing
Add `random()` and `random_seed()`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 69
- Forks
- 14
- Ø Merge
- 15 T. 22 Std.
- Gemergte PRs (30 T.)
- 3
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den im Issue verlinkten Referenzseiten zu random() und randomSeed(), und suche dann die entsprechenden Processing-API-Einstiegspunkte in libprocessing. Implementiere beide Funktionen mit dem dokumentierten Verhalten für einen bzw. zwei Parameter und deterministischer Ausgabe bei gesetztem Seed, und überprüfe, dass die resultierende API mit diesen Beispielen übereinstimmt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100