Libraryless. Click here for Pure Java version (4792L/27K).
1 | static L<DoublePt> toDoublePts(L<Pt> l) {
|
2 | ret map toDoublePt(l); |
3 | } |
4 | |
5 | static L<DoublePt> toDoublePts(double... coords) {
|
6 | int n = l(coords)/2; |
7 | L<DoublePt> l = emptyList(n); |
8 | for i to n: |
9 | l.add(doublePt(coords[i*2], coords[i*2+1])); |
10 | ret l; |
11 | } |
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: | 381 / 492 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |