Libraryless. Click here for Pure Java version (2155L/14K).
1 | static double mapMethodLike doublePar(S name, O[] _, double defaultValue) { |
2 | Number n = cast optPar(name, _); |
3 | ret n == null? defaultValue : n.doubleValue(); |
4 | } |
Began life as a copy of #1020474
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025028 |
Snippet name: | doublePar - optional parameter with smart casting to Double |
Eternal ID of this version: | #1025028/1 |
Text MD5: | 804271975df886b0559f1fb12a1ec912 |
Transpilation MD5: | 39a8be0d507dbe7e8d4356cc5afcbe31 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-01 18:40:49 |
Source code size: | 164 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 226 / 306 |
Referenced in: | [show references] |