//数学函数--11个 export const MathFunc = [ { "key": "abs", "name": "abs", "params": [ { "key": "value", "name": "value", "type": "double" } ], "description": `[Function]: Return the absolute value of a numerical value \n[Return value type]: Numerical value (Double)\n [Example]: abs(-1.5) [Return value]: 1.5`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "Round", "name": "Round", "params": [ { "key": "value1", "name": "value", "type": "double" }, { "key": "value2", "name": "Decimal", "type": "int32" } ], "description": `【Function】:Rounds the number to the specified precision\n【value1】:value \n【value2】:Round off decimal places\n【Return Type】:Double(System.Double)\n【Example】:\nRound(1.52,1)\n【Return】:1.5`, "type": "Math", "keyFront": "DefaultFunction", "className": "" }, { "key": "round", "name": "round", "params": [ { "key": "value1", "name": "value", "type": "double" }, { "key": "value2", "name": "Decimal", "type": "int32" } ], "description": `[Function]: According to the precision of decimal places, the value is rounded \n[value1]: Value \n[value2]: Round off the number of decimal places \n[Return value type]: Number (Double)\n [Example]: round(1.52, 1) [Return value ]: 1.5`, "type": "Math", "keyFront": "DefaultFunction", "className": "" }, { "key": "random", "name": "random", "params": [], "description": `[Function]: Randomly generate a pseudo-random value greater than or equal to 0.0 and less than 1.0 \n[Return value type]: Numeric (Double)\n [Example]: random() [Return value]: 0.624508349393`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "sin", "name": "sin", "params": [ { "key": "value", "name": "value", "type": "double" } ], "description": `[Function]: Return the sine value of a number \n[Return value type]: Value (Double) an angle expressed in radians\n [Example]: sin(1) [Return value]: 0.84187098`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "cos", "name": "cos", "params": [ { "key": "value", "name": "value", "type": "double" } ], "description": `[Function]: Return the cosine value of a number \n[Return value type]: Value (Double) an angle expressed in radians\n [Example]: cos(3) [Return value]: -0.9899924`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "ceil", "name": "ceil", "params": [ { "key": "value", "name": "value", "type": "double" } ], "description": `[Function]: Return the integer greater than or equal to the function parameter and closest to it \n[Return value type]: Numeric (Int32)\n [Example]: ceil(3.2) [Return value]: 4`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "floor", "name": "floor", "params": [ { "key": "value", "name": "value", "type": "double" } ], "description": `[Function]: Return the integer less than or equal to the function parameter and the closest integer \n[Return value type]: Numeric (Int32)\n [Example]: floor(3.2) [Return value]: 3`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "BankerRound", "name": "BankerRound", "params": [ { "key": "value1", "name": "value", "type": "double" }, { "key": "value2", "name": "小数位数", "type": "int32" } ], "description": `【Function】:使用银行家舍入标准,把指定数字舍入为最接近的数字\n【value1】:要舍入的数值\n【value2】:要舍入的小数位数\n【Return Type】:数值(System.Double)\n【Example】:BankerRound(36.124,2)\n【Return】:36.12`, "type": "Math", "keyFront": "Math", "className": "" }, { "key": "bankerRound", "name": "bankerRound", "params": [ { "key": "value1", "name": "value", "type": "double" }, { "key": "value2", "name": "Decimal", "type": "int32" } ], "description": `[Function]: Use the banker’s rounding standard to round the specified number to the nearest number \n[value1]: Rounding value \n[value2]: Rounding off the number of decimal places \n[Return value type]: Numerical value (Double)\n【 Example]: bankerRound(36.124,2) [Return value]: 36.12`, "type": "Math", "keyFront": "DefaultFunction", "className": "" }, { "key": "NumberThousandSeparator", "name": "NumberThousandSeparator", "params": [ { "key": "property", "name": "property", "type": "int32" } ], "description": `[Function] Add thousands separator to numbers, use comma as thousands separator [Parameter] [Property] field(chain structure) [ReturnType] string [Example] [Scenes] Submit a document 'Order', the document contains the total cost 'totalCost' [Requirement] Optimize the display of total cost and add thousands separator to total cost [Demo] NumberThousandSeparator(Order.totalCost) [Return] 1,234,567.89`, "type": "Math", "keyFront": "DefaultFunction", "className": "" } ]