aboutsummaryrefslogtreecommitdiff
path: root/std/math/complex/abs.zig
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2019-05-01 18:15:57 +1200
committerMarc Tiehuis <marctiehuis@gmail.com>2019-05-01 18:37:46 +1200
commit89d71a960b0f90335fded84a449a84806bb6f661 (patch)
treeefbb720dbdd17ad782233c958f11d2f584d662c4 /std/math/complex/abs.zig
parentf94964cd057ace39caa05c10d9626ac6a4beb23b (diff)
downloadzig-89d71a960b0f90335fded84a449a84806bb6f661.tar.gz
zig-89d71a960b0f90335fded84a449a84806bb6f661.zip
std.math: Add documentation for all functions and algorithm sources
Diffstat (limited to 'std/math/complex/abs.zig')
-rw-r--r--std/math/complex/abs.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/std/math/complex/abs.zig b/std/math/complex/abs.zig
index e1368d6ef6..8105f57218 100644
--- a/std/math/complex/abs.zig
+++ b/std/math/complex/abs.zig
@@ -4,6 +4,7 @@ const math = std.math;
const cmath = math.complex;
const Complex = cmath.Complex;
+/// Returns the absolute value (modulus) of z.
pub fn abs(z: var) @typeOf(z.re) {
const T = @typeOf(z.re);
return math.hypot(T, z.re, z.im);