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

7
LINES

< > BotCompany Repo | #1024737 // byteArraysTotalDiff

JavaX fragment (include)

static long byteArraysTotalDiff(byte[] a, byte[] b) {
  long diff = 0;
  int n = l(a);
  assertEquals("array length", n, l(b));
  for i to n: diff += abs(((int) a[i])-b[i]);
  ret diff;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024737
Snippet name: byteArraysTotalDiff
Eternal ID of this version: #1024737/1
Text MD5: 19d1067bd2ab6f2dee94735b3718591c
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-24 15:39:50
Source code size: 193 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 243 / 278
Referenced in: [show references]