1 | static long byteArraysTotalDiff(byte[] a, byte[] b) { |
2 | long diff = 0; |
3 | int n = l(a); |
4 | assertEquals("array length", n, l(b)); |
5 | for i to n: diff += abs(((int) a[i])-b[i]); |
6 | ret diff; |
7 | } |
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: | 244 / 279 |
Referenced in: | [show references] |