Libraryless. Click here for Pure Java version (3848L/22K).
static Complex complex(double re, double im) { ret Complex(re, im); } static Complex complex(double re) { ret Complex(re, 0.0); } static Complex complex(double[] reIm) { if (empty(reIm)) null; if (l(reIm) != 2) fail("Need 2 doubles to make complex number"); ret complex(reIm[0], reIm[1]); }
Began life as a copy of #1032421
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032994 |
Snippet name: | complex - make complex number (class Complex) |
Eternal ID of this version: | #1032994/3 |
Text MD5: | bd133576a47dc4a0eaae918ff887461d |
Transpilation MD5: | 89605ed6947b7f3f705f4356bd057172 |
Author: | stefan |
Category: | javax / maths |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-18 01:10:32 |
Source code size: | 314 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 177 / 294 |
Version history: | 2 change(s) |
Referenced in: | [show references] |