View source code
Display the source code in std/complex.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.complex.sin
Trigonometric functions on complex
numbers.
Prototype
Complex!T sin(T)( Complex!T z ) pure nothrow @nogc @safe;
Parameters
Name | Description |
---|---|
z | A complex number. |
Returns
The sine and cosine of
, respectively.
z
Example
assert(sin(complex(0.0)) == 0.0); assert(sin(complex(2.0L, 0)) == std.math.sin(2.0L));
Example
import std.math; import std.complex; assert(cos(complex(0.0)) == 1.0); assert(cos(complex(1.3L)) == std.math.cos(1.3L)); assert(cos(complex(0, 5.2L)) == cosh(5.2L));
Authors
Lars Tandle Kyllingstad, Don Clugston