aboutsummaryrefslogtreecommitdiffstats
path: root/calc.go
diff options
context:
space:
mode:
Diffstat (limited to 'calc.go')
-rw-r--r--calc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/calc.go b/calc.go
index 8a114a4..4eab368 100644
--- a/calc.go
+++ b/calc.go
@@ -12,6 +12,13 @@ const (
modeRad = true
)
+func (a AngleMode) String() string {
+ if a == modeDeg {
+ return "deg"
+ }
+ return "rad"
+}
+
type Calculator struct {
stack Stack
buf string