Libraryless. Click here for Pure Java version (59L/1K).
1 | // white = certain (either completely black or completely white) |
2 | // black = uncertain (exactly 50% gray) |
3 | static double g22pixelCertainty(double pixel) {
|
4 | ret absdiff(pixel, 0.5)*2; |
5 | } |
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: | 410 / 500 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |