aboutsummaryrefslogtreecommitdiffstats
path: root/calc.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2023-07-29 11:19:55 -0230
committerSam Anthony <sam@samanthony.xyz>2023-07-29 11:19:55 -0230
commit008e4021375883610cf1b07e005a4176acadc0de (patch)
tree3148bbf1945c8e0517810ea234e16c498f968eb4 /calc.go
parentc12813975d7529f864199b876bc3ee3b470c1c18 (diff)
downloadpfc-008e4021375883610cf1b07e005a4176acadc0de.zip
trig functions
Diffstat (limited to 'calc.go')
-rw-r--r--calc.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/calc.go b/calc.go
index 8afc43a..1d969cc 100644
--- a/calc.go
+++ b/calc.go
@@ -5,9 +5,17 @@ import (
"strings"
)
+type AngleMode int
+
+const (
+ modeDeg = iota
+ modeRad
+)
+
type Calculator struct {
- stack Stack
- buf string
+ stack Stack
+ buf string
+ anglem AngleMode
}
// swap swaps the values of the buffer and the bottom element of the stack. If