Libraryless. Click here for Pure Java version (4968L/28K).
srecord Seconds(double seconds) is Comparable<Seconds> { double seconds aka get aka getDouble() { ret seconds; } toString { ret formatDouble(seconds, 3) + " s"; } public int compareTo(Seconds s) { ret cmp(seconds, s.seconds); } Seconds div(double x) { ret Seconds(get()/x); } Seconds minus(Seconds x) { ret Seconds(get()-x!); } }
Began life as a copy of #1032953
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033101 |
Snippet name: | Seconds |
Eternal ID of this version: | #1033101/4 |
Text MD5: | 879e48efbcab99a3d24ce63886462f67 |
Transpilation MD5: | f4df19976b193d45386547a67c8f197a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-23 05:36:13 |
Source code size: | 365 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 177 / 333 |
Version history: | 3 change(s) |
Referenced in: | [show references] |