digitalmars.D - other (maybe silly) complex questions
- dennis luehring (15/15) Nov 20 2005 1. why can i write
- Walter Bright (7/21) Nov 24 2005 You can do that now with 0.140.
1. why can i write
template foo(U : int, int T : 10)
{
U x = T;
}
but not
template foo(U : cfloat, cfloat T : 1 + 1i)
{
U x = T;
}
2. is there an |z| or z.norm propertie or something?
3. how can i get the root(s) of complex numbers in d
(must i do it myself?)
4. will there be something like z.conj?
ciao dennis
Nov 20 2005
"dennis luehring" <dl.soluz gmx.net> wrote in message news:dlq2hb$2nj2$1 digitaldaemon.com...1. why can i write template foo(U : int, int T : 10) { U x = T; } but not template foo(U : cfloat, cfloat T : 1 + 1i) { U x = T; }You can do that now with 0.140.2. is there an |z| or z.norm propertie or something?std.math.hypot should do it.3. how can i get the root(s) of complex numbers in d (must i do it myself?)Currently, you'll have to do it yourself. If you want, you can contribute the result to Phobos.4. will there be something like z.conj?Probably a good idea.
Nov 24 2005








"Walter Bright" <newshound digitalmars.com>