Libraryless. Click here for Pure Java version (3848L/22K).
1 | static Complex complex(double re, double im) { |
2 | ret Complex(re, im); |
3 | } |
4 | |
5 | static Complex complex(double re) { |
6 | ret Complex(re, 0.0); |
7 | } |
8 | |
9 | static Complex complex(double[] reIm) { |
10 | if (empty(reIm)) null; |
11 | if (l(reIm) != 2) fail("Need 2 doubles to make complex number"); |
12 | ret complex(reIm[0], reIm[1]); |
13 | } |
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: | 184 / 307 |
Version history: | 2 change(s) |
Referenced in: | [show references] |