1 | sclass RandomAndVary_Float implements RandomAndVary<Float> { |
2 | float min = 0, max = 1; |
3 | double varyFactor = 0.1; |
4 | |
5 | public Float randomInstance() { ret randomFloat(min, max); } |
6 | public Float varyInstance(Float a) { |
7 | ret (float) clipDouble(min, max, a+(max-min)*varyFactor); |
8 | } |
9 | } |
Began life as a copy of #1022932
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022936 |
Snippet name: | RandomAndVary_Float |
Eternal ID of this version: | #1022936/2 |
Text MD5: | b09c8c995286c4a502cfc492ef92dd1b |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-14 23:19:02 |
Source code size: | 294 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 278 / 708 |
Version history: | 1 change(s) |
Referenced in: | [show references] |