Libraryless. Click here for Pure Java version (5216L/29K).
static <A, B extends Matrix<A>> B copyMatrix(Matrix<A> src, B dest) { assertSameSize(src, dest); int w = src.getWidth(), h = src.getHeight(); for y to h: for x to w: dest.set(x, y, src.get(x, y)); ret dest; }
Began life as a copy of #1033649
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033658 |
Snippet name: | copyMatrix |
Eternal ID of this version: | #1033658/4 |
Text MD5: | d333b04f20e26d7d80aa2c9741000d34 |
Transpilation MD5: | cc323c926c01ee5d781f99f4777fe3a7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-12-26 16:02:30 |
Source code size: | 243 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 154 / 216 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |