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

11
LINES

< > BotCompany Repo | #1033742 // toDoublePts

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

Libraryless. Click here for Pure Java version (4792L/27K).

static L<DoublePt> toDoublePts(L<Pt> l) {
  ret map toDoublePt(l);
}

static L<DoublePt> toDoublePts(double... coords) {
  int n = l(coords)/2;
  L<DoublePt> l = emptyList(n);
  for i to n:
    l.add(doublePt(coords[i*2], coords[i*2+1]));
  ret l;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033742
Snippet name: toDoublePts
Eternal ID of this version: #1033742/2
Text MD5: dd11f64de4deae1a0c4d682c81783cec
Transpilation MD5: 038cd8f4e77081c06cebb77732eaee33
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-01 22:28:21
Source code size: 259 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 88 / 137
Version history: 1 change(s)
Referenced in: [show references]