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

6
LINES

< > BotCompany Repo | #1018717 // floatCloseTo

JavaX fragment (include)

1  
static Float floatCloseTo(Collection<Float> l, float x, double margin) {
2  
  for (float f : unnull(l))
3  
    if (abs(f-x) <= margin)
4  
      ret f;
5  
  null;
6  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018717
Snippet name: floatCloseTo
Eternal ID of this version: #1018717/1
Text MD5: 4f2f6317a0a3aef6264464553f6d82ec
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-11 20:58:34
Source code size: 156 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 302 / 342
Referenced in: [show references]