From 008e4021375883610cf1b07e005a4176acadc0de Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 29 Jul 2023 11:19:55 -0230 Subject: trig functions --- calc.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'calc.go') 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 -- cgit v1.2.3