1 | sclass RandomAndVary_Double implements RandomAndVary<Double> { |
2 | double min = 0, max = 1, varyFactor = 0.1; |
3 | |
4 | public Double randomInstance() { ret random(min, max); } |
5 | public Double varyInstance(Double a) { |
6 | ret clipDouble(min, max, a+(max-min)*varyFactor); |
7 | } |
8 | } |
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: | #1022932 |
Snippet name: | RandomAndVary_Double |
Eternal ID of this version: | #1022932/2 |
Text MD5: | dd858d7bdc2c3c2ab872b30e71cbed48 |
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:13 |
Source code size: | 277 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 337 / 756 |
Version history: | 1 change(s) |
Referenced in: | [show references] |