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

10
LINES

< > BotCompany Repo | #1033248 // doubleToShortArray_iround

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (3844L) is out of date.

static short[] doubleToShortArray_iround(double[] a, int start, int end) {
  short[] b = new[end-start];
  for (int i = start; i < end; i++)
    b[i-start] = clampToShort(iround(a[i]));
  ret b;
}

static short[] doubleToShortArray_iround(double[] a) {
  ret a == null ?: doubleToShortArray_iround(a, 0, a.length);
}

Author comment

Began life as a copy of #1026893

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033248
Snippet name: doubleToShortArray_iround
Eternal ID of this version: #1033248/2
Text MD5: c5efdc25ac29f04630d485138c2b83bf
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-17 20:31:56
Source code size: 325 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 83 / 118
Version history: 1 change(s)
Referenced in: [show references]