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

5
LINES

< > BotCompany Repo | #1005855 // safeRatio

JavaX fragment (include)

1  
static float safeRatio(float x, float y) {
2  
  float r = x/y;
3  
  //print("ratio=" + r + " (x=" + x + ", y=" + y + ")");
4  
  ret Double.isNaN(r) ? 0f : r;
5  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005855
Snippet name: safeRatio
Eternal ID of this version: #1005855/1
Text MD5: 0a9ba5ee455aee557a5a4b3ec38dfc84
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-11 08:02:30
Source code size: 154 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 475 / 480
Referenced in: [show references]