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

3
LINES

< > BotCompany Repo | #1033572 // quantize0To255 [posterize]

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

Libraryless. Click here for Pure Java version (109L/1K).

static double quantize0To255(int n, double x) {
  ret quantizeToNLevelsBetweenZeroAndOne_stretch(n, x/255)*255;
}

Author comment

Began life as a copy of #1032491

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033572
Snippet name: quantize0To255 [posterize]
Eternal ID of this version: #1033572/1
Text MD5: 6ae7f25bb459476821217d17988946de
Transpilation MD5: 873150a32d207b50105dda39136b7f60
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-03 19:59:15
Source code size: 115 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 123 / 182
Referenced in: [show references]