processing / processing/libprocessing
Add `random()` and `random_seed()`
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 69
- Fork
- 14
- Merge trung bình
- 15 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các trang tham chiếu về random() và randomSeed() được liên kết trong issue, sau đó tìm các điểm vào tương ứng của Processing API trong libprocessing. Triển khai cả hai hàm với hành vi được tài liệu hóa cho một và hai tham số, cùng đầu ra xác định khi sử dụng seed, rồi xác minh rằng API thu được khớp với các ví dụ đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- api
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100