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

7
LINES

< > BotCompany Repo | #1022941 // CloseToColorPredicate

JavaX fragment (include)

1  
srecord CloseToColorPredicate(int color, double maxDistance) extends F1<Int, Bool> {
2  
  Bool get(Int rgb) {
3  
    ret rgbDiff(rgb, color) <= maxDistance;
4  
  }
5  
  
6  
  toString { ret "CloseToColorPredicate(" + RGB(color) + ", " + maxDistance + ")"; }
7  
}

Author comment

Began life as a copy of #1022940

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022941
Snippet name: CloseToColorPredicate
Eternal ID of this version: #1022941/5
Text MD5: 2fad71a3723f45bed94ccba1934a6548
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-15 03:12:38
Source code size: 250 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 334 / 752
Version history: 4 change(s)
Referenced in: [show references]