Lines Matching refs:Complex

41         return Complex!R(re, 0);
43 return Complex!double(re, 0);
51 return Complex!(CommonType!(R, I))(re, im);
53 return Complex!double(re, im);
60 static assert(is(typeof(a) == Complex!double));
65 static assert(is(typeof(b) == Complex!real));
70 static assert(is(typeof(c) == Complex!double));
75 static assert(is(typeof(d) == Complex!real));
80 static assert(is(typeof(e) == Complex!double));
85 static assert(is(typeof(f) == Complex!double));
90 static assert(is(typeof(g) == Complex!real));
99 struct Complex(T)
170 this(R : T)(Complex!R z)
193 ref Complex opAssign(R : T)(Complex!R z)
201 ref Complex opAssign(R : T)(R r)
211 bool opEquals(R : T)(Complex!R z) const
225 Complex opUnary(string op)() const
232 Complex opUnary(string op)() const
235 return Complex(-re, -im);
241 Complex!(CommonType!(T,R)) opBinary(string op, R)(Complex!R z) const
249 Complex!(CommonType!(T,R)) opBinary(string op, R)(R r) const
258 Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
265 Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
268 return Complex(r - re, -im);
272 Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R r) const
298 Complex!(CommonType!(T, R)) opBinaryRight(string op, R)(R lhs) const
325 ref Complex opOpAssign(string op, C)(C z)
326 if ((op == "+" || op == "-") && is(C R == Complex!R))
334 ref Complex opOpAssign(string op, C)(C z)
335 if (op == "*" && is(C R == Complex!R))
344 ref Complex opOpAssign(string op, C)(C z)
345 if (op == "/" && is(C R == Complex!R))
370 ref Complex opOpAssign(string op, C)(C z)
371 if (op == "^^" && is(C R == Complex!R))
385 ref Complex opOpAssign(string op, U : T)(U a)
393 ref Complex opOpAssign(string op, U : T)(U a)
402 ref Complex opOpAssign(string op, R)(R r)
414 ref Complex opOpAssign(string op, U)(U i)
450 auto c2 = Complex!double(0.5, 2.0);
586 auto cf = Complex!float(1.0, 1.0);
587 auto cr = Complex!real(1.0, 1.0);
590 static assert(is(typeof(c1pcf) == Complex!double));
591 static assert(is(typeof(c1pcr) == Complex!real));
620 Complex!double a = 1;
622 Complex!double b = 1.0;
624 Complex!double c = Complex!real(1.0, 2);
631 Complex!double z;
645 auto w = Complex!real(1.0, 1.0);
650 auto c = Complex!float(2.0, 2.0);
670 template Complex(T)
671 if (is(T R == Complex!R))
673 alias Complex = T; variable
678 static assert(is(Complex!(Complex!real) == Complex!real));
680 Complex!T addI(T)(T x)
682 return x + Complex!T(0.0, 1.0);
688 enum one = Complex!double(1.0, 0.0);
698 T abs(T)(Complex!T z) @safe pure nothrow @nogc in abs()
721 T sqAbs(T)(Complex!T z) @safe pure nothrow @nogc in sqAbs()
759 T arg(T)(Complex!T z) @safe pure nothrow @nogc in arg()
779 Complex!T conj(T)(Complex!T z) @safe pure nothrow @nogc
781 return Complex!T(z.re, -z.im);
799 Complex!(CommonType!(T, U)) fromPolar(T, U)(T modulus, U argument)
803 return Complex!(CommonType!(T,U))
823 Complex!T sin(T)(Complex!T z) @safe pure nothrow @nogc
841 Complex!T cos(T)(Complex!T z) @safe pure nothrow @nogc
873 Complex!real expi(real y) @trusted pure nothrow @nogc
876 return Complex!real(cos(y), sin(y));
896 Complex!T sqrt(T)(Complex!T z) @safe pure nothrow @nogc
954 auto c2 = Complex!double(0.5, 2.0);
981 wstring wformat(T)(string format, Complex!T c) in wformat()