aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--const.go7
-rw-r--r--doc/const.14
2 files changed, 11 insertions, 0 deletions
diff --git a/const.go b/const.go
index 3808e82..0aa5a37 100644
--- a/const.go
+++ b/const.go
@@ -2,12 +2,19 @@ package main
import "math"
+const (
+ // Vacuum permettivity [C²/(N·m²)]
+ e0 = 8.8541878188e-12
+)
+
func parseConstant(s string) (float64, error) {
switch s {
case "pi":
return math.Pi, nil
case "e":
return math.E, nil
+ case "e0":
+ return e0, nil
}
return 0, InvalidConstantErr{s}
}
diff --git a/doc/const.1 b/doc/const.1
index a4eb3b6..9c32108 100644
--- a/doc/const.1
+++ b/doc/const.1
@@ -7,3 +7,7 @@ Archimedes’ constant (π).
.TP
.B e
Euler’s number (e).
+.
+.TP
+.B e0
+Vacuum permettivity (ε₀)