Documentation ¶
Overview ¶
*
- 四则混合运算类
- *初始化的时候需要传入公式:
- *只支持加减乘除和括号 *
- *execute计算结算方法
- *参数一个变量和数值的字符串数组
- *AVAILABLE_PARAMETER_CODE(变量定义,只支持单字节变量)
- *例:公式a+b*4
- *参数String[]{"a","1","b","2"}
- *计算结果9 *
Index ¶
- Constants
- Variables
- func M2float64(i interface{}) float64
- func M2int64(i interface{}) int64
- func M2string(i interface{}) string
- func PanicToErr(err *error)
- func PanicValToErr(panicVal interface{}, err *error)
- func Stof64(v string, def ...float64) float64
- func Stoi64(v string, def ...int64) int64
- type Operate
Constants ¶
View Source
const ( //四则运算符号 AVAILABLE_CODE = "+-*/()^√" //小数符号 AVAILABLE_DECIMAL_CODE = "1234567890.E" //参数符配置 AVAILABLE_PARAMETER_CODE = "abcdefhijklmn" )
Variables ¶
View Source
var RecoverPanicToErr = true
Functions ¶
func PanicToErr ¶
func PanicToErr(err *error)
func PanicValToErr ¶
func PanicValToErr(panicVal interface{}, err *error)
Types ¶
Click to show internal directories.
Click to hide internal directories.