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

13
LINES

< > BotCompany Repo | #1019130 // Test RollingAverage (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6777L/48K).

!7

p-exp {
  new RollingAverage a;
  a.windowSize = 2;
  assertEqualsVerbose(0.0, a!);
  a.add(5);
  assertEqualsVerbose(5.0, a!);
  a.add(10);
  assertEqualsVerbose(7.5, a!);
  a.add(15);
  assertEqualsVerbose(12.5, a!);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019130
Snippet name: Test RollingAverage (OK)
Eternal ID of this version: #1019130/2
Text MD5: 1b05c99499e1d66d060e337afbd12467
Transpilation MD5: a1649c1d1ef74552dd4b52f93c4bc0f8
Author: stefan
Category: javax / math
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-24 13:16:09
Source code size: 236 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 508 / 1236
Version history: 1 change(s)
Referenced in: [show references]