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

11
LINES

< > BotCompany Repo | #1006807 // avg - average of 2 values

JavaX fragment (include)

1  
static float avg(float a, float b) {
2  
  ret (a+b)/2;
3  
}
4  
5  
static double avg(double a, double b) {
6  
  ret (a+b)/2;
7  
}
8  
9  
static double avg(double[] l) {
10  
  ret doubleAverage(l);
11  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006807
Snippet name: avg - average of 2 values
Eternal ID of this version: #1006807/4
Text MD5: af0f15ff53be65d08d3b17a7badf2313
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-02 05:17:55
Source code size: 182 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 487 / 550
Version history: 3 change(s)
Referenced in: [show references]