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

5
LINES

< > BotCompany Repo | #1035869 // g22pixelCertainty

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

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

// white = certain (either completely black or completely white)
// black = uncertain (exactly 50% gray)
static double g22pixelCertainty(double pixel) {
  ret absdiff(pixel, 0.5)*2;
}

Author comment

Began life as a copy of #1035847

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035869
Snippet name: g22pixelCertainty
Eternal ID of this version: #1035869/5
Text MD5: a1ed743d245467234ca1937a101ba4fe
Transpilation MD5: cc98d83b8ba07a83ed383e402b5417c3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-05 15:44:59
Source code size: 187 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 66 / 99
Version history: 4 change(s)
Referenced in: [show references]