std.math.complex.abs
pub fn abs(z: anytype) @TypeOf(z.re, z.im)
Returns the absolute value (modulus) of z.
- Kind
- function
- Module
std.math.complex
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.math.complex in the Zig reference. This page has 32 cards.
pub fn abs(z: anytype) @TypeOf(z.re, z.im)
Returns the absolute value (modulus) of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn acos(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the arc-cosine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn acosh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic arc-cosine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn arg(z: anytype) @TypeOf(z.re, z.im)
Returns the angular component (in radians) of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn asin(z: anytype) Complex(@TypeOf(z.re, z.im))
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn asinh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic arc-sine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn atan(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the arc-tangent of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn atanh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic arc-tangent of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn Complex(comptime T: type) type
A complex number consisting of a real an imaginary part.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn add(self: Self, other: Self) Self
Returns the sum of two complex numbers.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn conjugate(self: Self) Self
Returns the complex conjugate of a number.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn div(self: Self, other: Self) Self
Returns the quotient of two complex numbers.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(re: T, im: T) Self
Create a new Complex number from the given real and imaginary parts.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn magnitude(self: Self) T
Returns the magnitude of a complex number.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul(self: Self, other: Self) Self
Returns the product of two complex numbers.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mulbyi(self: Self) Self
Returns the product of complex number and i=sqrt(-1).
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn neg(self: Self) Self
Returns the negation of a complex number.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn reciprocal(self: Self) Self
Returns the reciprocal of a complex number.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn squaredMagnitude(self: Self) T
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sub(self: Self, other: Self) Self
Returns the subtraction of two complex numbers.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn conj(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the complex conjugate of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cos(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the cosine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cosh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic arc-cosine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn exp(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns e raised to the power of z (e^z).
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn log(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the natural logarithm of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn pow(z: anytype, s: anytype) Complex(@TypeOf(z.re, z.im, s.re, s.im))
Returns z raised to the complex power of c.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn proj(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the projection of z onto the riemann sphere.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sin(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the sine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sinh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic sine of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sqrt(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the square root of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tan(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the tangent of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn tanh(z: anytype) Complex(@TypeOf(z.re, z.im))
Returns the hyperbolic tangent of z.
std.math.complexSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.