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

5
LINES

< > BotCompany Repo | #1005855 // safeRatio

JavaX fragment (include)

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

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: 474 / 479
Referenced in: [show references]