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

7
LINES

< > BotCompany Repo | #1022941 // CloseToColorPredicate

JavaX fragment (include)

srecord CloseToColorPredicate(int color, double maxDistance) extends F1<Int, Bool> {
  Bool get(Int rgb) {
    ret rgbDiff(rgb, color) <= maxDistance;
  }
  
  toString { ret "CloseToColorPredicate(" + RGB(color) + ", " + maxDistance + ")"; }
}

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: 333 / 751
Version history: 4 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)