Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1031894 // dm_doubleSpinner - this is nonsense (why?)

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (13636L) is out of date.

static JSpinner mapMethodLike dm_doubleSpinner(S field, double min, double max) {
  int steps = 10000;
  ret liveValueSpinner(dm_fieldLiveValueWithConversions(field, Int,
    d -> iround((clamp(d, min, max)-min)/(max-min)*steps),
    i -> min+i*(max-min)/steps), 0, steps);
}

Author comment

Began life as a copy of #1024556

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031894
Snippet name: dm_doubleSpinner - this is nonsense (why?)
Eternal ID of this version: #1031894/3
Text MD5: bd95db39fdc44258cc595ae792b7da8b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-12 16:35:49
Source code size: 280 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 181 / 261
Version history: 2 change(s)
Referenced in: [show references]