Documentation ¶
Overview ¶
Package clac implements an RPN calculator.
Index ¶
- Variables
- func ParseNum(tok string) (val value.Value, err error)
- func SetFormat(format string)
- func Sprint(val value.Value) string
- func Trunc(val value.Value) (value.Value, error)
- type Clac
- func (c *Clac) Abs() error
- func (c *Clac) Acos() error
- func (c *Clac) Add() error
- func (c *Clac) And() error
- func (c *Clac) AndN() error
- func (c *Clac) Asin() error
- func (c *Clac) Atan() error
- func (c *Clac) Atan2() error
- func (c *Clac) Avg() error
- func (c *Clac) Ceil() error
- func (c *Clac) Clear() error
- func (c *Clac) Comb() error
- func (c *Clac) Cos() error
- func (c *Clac) Cross() error
- func (c *Clac) DegToRad() error
- func (c *Clac) Depth() error
- func (c *Clac) Div() error
- func (c *Clac) Dot() error
- func (c *Clac) Dot3() error
- func (c *Clac) Drop() error
- func (c *Clac) DropN() error
- func (c *Clac) DropR() error
- func (c *Clac) Dup() error
- func (c *Clac) DupN() error
- func (c *Clac) DupR() error
- func (c *Clac) EnableHistory(enable bool)
- func (c *Clac) Exec(f func() error) error
- func (c *Clac) Exp() error
- func (c *Clac) Factorial() error
- func (c *Clac) Floor() error
- func (c *Clac) Hypot() error
- func (c *Clac) IntDiv() error
- func (c *Clac) Inv() error
- func (c *Clac) Lg() error
- func (c *Clac) Ln() error
- func (c *Clac) Log() error
- func (c *Clac) LogN() error
- func (c *Clac) Mag() error
- func (c *Clac) Max() error
- func (c *Clac) MaxN() error
- func (c *Clac) Min() error
- func (c *Clac) MinN() error
- func (c *Clac) Mod() error
- func (c *Clac) Mul() error
- func (c *Clac) Neg() error
- func (c *Clac) Not() error
- func (c *Clac) Or() error
- func (c *Clac) OrN() error
- func (c *Clac) Perm() error
- func (c *Clac) Pick() error
- func (c *Clac) PolarToRect() error
- func (c *Clac) Pop() (value.Value, error)
- func (c *Clac) Pow() error
- func (c *Clac) Pow10() error
- func (c *Clac) Pow2() error
- func (c *Clac) Push(x value.Value) error
- func (c *Clac) RadToDeg() error
- func (c *Clac) RectToPolar() error
- func (c *Clac) Redo() error
- func (c *Clac) Reset() error
- func (c *Clac) Rot() error
- func (c *Clac) RotR() error
- func (c *Clac) Sin() error
- func (c *Clac) Sqrt() error
- func (c *Clac) Stack() Stack
- func (c *Clac) Sub() error
- func (c *Clac) Sum() error
- func (c *Clac) Swap() error
- func (c *Clac) Tan() error
- func (c *Clac) Trunc() error
- func (c *Clac) Undo() error
- func (c *Clac) Unrot() error
- func (c *Clac) UnrotR() error
- func (c *Clac) Xor() error
- func (c *Clac) XorN() error
- type Stack
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Clac ¶
type Clac struct {
// contains filtered or unexported fields
}
Clac represents an RPN calculator.
func (*Clac) AndN ¶
AndN returns the bitwise and of the integer portions of the last x stack values.
func (*Clac) Cross ¶
Cross returns the cross product of two 3D vectors The vectors are composed of the last 6 items on the stack
func (*Clac) Dot ¶
Dot returns the dot product of two vectors of size x The vectors are composed of the 2*x items on the stack above x
func (*Clac) Dot3 ¶
Dot3 returns the dot product of two 3D vectors The vectors are composed of the last 6 items on the stack
func (*Clac) EnableHistory ¶
EnableHistory sets whether to retain history
func (*Clac) PolarToRect ¶
PolarToRect converts 2D polar coordinates y<x to rectangular coordinates.
func (*Clac) RectToPolar ¶
RectToPolar converts 2D rectangular coordinates y,x to polar coordinates.