processing / processing/libprocessing
Add `random()` and `random_seed()`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Rust
- Estrellas
- 69
- Forks
- 14
- Merge medio
- 15 d 22 h
- PR fusionados (30 d)
- 3
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza por las páginas de referencia de random() y randomSeed() enlazadas en el issue y, después, localiza los puntos de entrada correspondientes de la Processing API en libprocessing. Implementa ambas funciones con el comportamiento documentado para uno y dos parámetros, y con una salida determinista al usar una semilla; verifica que la API resultante coincida con esos ejemplos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- api
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 68/100