@@ -64,6 +64,10 @@ public foreign handler MCMathEvalTruncNumber(in Operand as number, out Value as
6464public foreign handler MCMathEvalMinInteger(in Left as int, in Right as int, out Value as int) as undefined binds to "<builtin>"
6565public foreign handler MCMathEvalMinReal(in Left as double, in Right as double, out Value as double) as undefined binds to "<builtin>"
6666public foreign handler MCMathEvalMinNumber(in Left as number, in Right as number, out Value as number) as undefined binds to "<builtin>"
67+
68+ public foreign handler MCMathEvalMinList(in List as list, out Value as number) as undefined binds to "<builtin>"
69+ public foreign handler MCMathEvalMaxList(in List as list, out Value as number) as undefined binds to "<builtin>"
70+
6771public foreign handler MCMathEvalMaxInteger(in Left as int, in Right as int, out Value as int) as undefined binds to "<builtin>"
6872public foreign handler MCMathEvalMaxReal(in Left as double, in Right as double, out Value as double) as undefined binds to "<builtin>"
6973public foreign handler MCMathEvalMaxNumber(in Left as number, in Right as number, out Value as number) as undefined binds to "<builtin>"
@@ -99,26 +103,37 @@ end syntax
99103--
100104
101105/*
106+ Syntax: sin(<Operand>)
102107Summary: Sin operator.
103108Operand: An expression that evaluates to a number.
104109
105110Example:
106111 variable tVar as number
107- put the sin of pi / 2 into tVar -- tVar contains 1
112+ put sin(pi / 2) into tVar -- tVar contains 1
113+
114+ Example:
115+ variable tVar as number
116+ put the sine of pi into tVar -- tVar contains 0
108117
109118Tags: Math
110119*/
111120
112121syntax SinOperator is prefix operator with precedence 1
113- "the" "sin " "of" <Operand: Expression>
122+ "the" "sine " "of" <Operand: Expression>
114123begin
115124 MCMathEvalSinNumber(Operand, output)
116125end syntax
117126
127+ public handler sin(in pOperand as number) as number
128+ variable tVar as number
129+ MCMathEvalSinNumber(pOperand, tVar)
130+ return tVar
131+ end handler
132+
118133/*
134+ Syntax: cos(<Operand>)
119135Summary: Cos operator.
120136Operand: An expression that evaluates to a number.
121- Syntax: cos(<Operand>)
122137
123138Example:
124139 variable tVar as number
@@ -140,29 +155,45 @@ public handler cos(in pOperand as number) as number
140155end handler
141156
142157/*
158+ Syntax: tan(<Operand>)
143159Summary: Tan operator.
144160Operand: An expression that evaluates to a number.
145161
146162Example:
147163 variable tVar as number
148- put the tan of pi /4 into tVar -- tVar contains approximately 1
164+ put the tan(pi) into tVar -- tVar contains 0
165+
166+ Example:
167+ variable tVar as number
168+ put the tangent of pi /4 into tVar -- tVar contains approximately 1
149169
150170Tags: Math
151171*/
152172
153173syntax TanOperator is prefix operator with precedence 1
154- "the" "tan " "of" <Operand: Expression>
174+ "the" "tangent " "of" <Operand: Expression>
155175begin
156176 MCMathEvalTanNumber(Operand, output)
157177end syntax
158178
179+ public handler tan(in pOperand as number) as number
180+ variable tVar as number
181+ MCMathEvalTanNumber(pOperand, tVar)
182+ return tVar
183+ end handler
184+
159185/*
186+ Syntax: asin(<Operand>)
160187Summary: Arcsin operator.
161188Operand: An expression that evaluates to a number.
162189
163190Example:
164191 variable tVar as number
165- put the arcsin of 1 into tVar -- tVar contains pi / 2
192+ put the asin(-1) into tVar -- tVar contains -pi/2
193+
194+ Example:
195+ variable tVar as number
196+ put the arcsine of 1 into tVar -- tVar contains pi/2
166197
167198Description:
168199The inverse of the sin operator.
@@ -171,18 +202,29 @@ Tags: Math
171202*/
172203
173204syntax ArcsinOperator is prefix operator with precedence 1
174- "the" "arcsin " "of" <Operand: Expression>
205+ "the" "arcsine " "of" <Operand: Expression>
175206begin
176207 MCMathEvalAsinNumber(Operand, output)
177208end syntax
178209
210+ public handler asin(in pOperand as number) as number
211+ variable tVar as number
212+ MCMathEvalAsinNumber(pOperand, tVar)
213+ return tVar
214+ end handler
215+
179216/*
217+ Syntax: acos(<Operand>)
180218Summary: Arccos operator.
181219Operand: An expression that evaluates to a number.
182220
183221Example:
184222 variable tVar as number
185- put the arccos of -1 into tVar -- tVar contains pi
223+ put acos(0) into tVar -- tVar contains pi/2
224+
225+ Example:
226+ variable tVar as number
227+ put the arccosine of -1 into tVar -- tVar contains pi
186228
187229Description:
188230The inverse of the cos operator.
@@ -191,18 +233,29 @@ Tags: Math
191233*/
192234
193235syntax ArccosOperator is prefix operator with precedence 1
194- "the" "arccos " "of" <Operand: Expression>
236+ "the" "arccosine " "of" <Operand: Expression>
195237begin
196238 MCMathEvalAcosNumber(Operand, output)
197239end syntax
198240
241+ public handler acos(in pOperand as number) as number
242+ variable tVar as number
243+ MCMathEvalAcosNumber(pOperand, tVar)
244+ return tVar
245+ end handler
246+
199247/*
248+ Syntax: atan(<Operand>)
200249Summary: Arctan operator.
201250Operand: An expression that evaluates to a number.
202251
203252Example:
204253 variable tVar as number
205- put the arctan of 1 into tVar -- tVar contains pi / 4
254+ put atan(-1) into tVar -- tVar contains -pi / 4
255+
256+ Example:
257+ variable tVar as number
258+ put the arctangent of 1 into tVar -- tVar contains pi / 4
206259
207260Description:
208261The inverse of the tan operator.
@@ -211,19 +264,30 @@ Tags: Math
211264*/
212265
213266syntax ArctanOperator is prefix operator with precedence 1
214- "the" "arctan " "of" <Operand: Expression>
267+ "the" "arctangent " "of" <Operand: Expression>
215268begin
216269 MCMathEvalAtanNumber(Operand, output)
217270end syntax
218271
272+ public handler atan(in pOperand as number) as number
273+ variable tVar as number
274+ MCMathEvalAtanNumber(pOperand, tVar)
275+ return tVar
276+ end handler
277+
219278/*
279+ Syntax: atan2(<yCoord>,<xCoord>)
220280Summary: Binary arctan operator.
221281yCoord: An expression that evaluates to a number.
222282xCoord: An expression that evaluates to a number.
223283
224284Example:
225285 variable tVar as number
226- put the arctan of -1,-1 into tVar --tVar contains −3π/4.
286+ put atan2(-1,-1) into tVar --tVar contains −3π/4.
287+
288+ Example:
289+ variable tVar as number
290+ put the binary arctangent of -1 and -1 into tVar --tVar contains −3π/4.
227291
228292Description:
229293The binary arctan operator returns the angle in radians between the x-axis and the line from the origin to the point (xCoord, yCoord).
@@ -233,14 +297,21 @@ Tags: Math
233297*/
234298
235299syntax BinaryArctanOperator is prefix operator with precedence 1
236- "the" "arctan2 " "of" <yCoord: Expression> ", " <xCoord: Expression>
300+ "the" "binary " "arctangent" " of" <yCoord: Expression> "and " <xCoord: Expression>
237301begin
238302 MCMathEvalAtan2Number(yCoord, xCoord, output)
239303end syntax
240304
305+ public handler atan2(in pY as number, in pX as number) as number
306+ variable tVar as number
307+ MCMathEvalAtan2Number(pX, pY, tVar)
308+ return tVar
309+ end handler
310+
241311--
242312
243313/*
314+ Syntax: log(<Operand>)
244315Summary: Base 10 log operator.
245316Operand: An expression that evaluates to a number.
246317
@@ -257,15 +328,22 @@ begin
257328 MCMathEvalBase10LogNumber(Operand, output)
258329end syntax
259330
331+ public handler log10(in pOperand as number) as number
332+ variable tVar as number
333+ MCMathEvalBase10LogNumber(pOperand, tVar)
334+ return tVar
335+ end handler
336+
260337--
261338
262339/*
340+ Syntax: ln(<Operand>)
263341Summary: Natural log operator.
264342Operand: An expression that evaluates to a number.
265343
266344Example:
267345 variable tVar as number
268- put the natural log of the exp of 3 into tVar -- tVar contains approximately 3
346+ put ln( exp(3)) into tVar -- tVar contains approximately 3
269347
270348Tags: Math
271349
@@ -277,26 +355,38 @@ begin
277355 MCMathEvalNaturalLogNumber(Operand, output)
278356end syntax
279357
358+ public handler ln(in pOperand as number) as number
359+ variable tVar as number
360+ MCMathEvalNaturalLogNumber(pOperand, tVar)
361+ return tVar
362+ end handler
280363
281364/*
365+ Syntax: exp(<Operand>)
282366Summary: Exponentiation operator.
283367Operand: An expression that evaluates to a number.
284368
285369Returns: e to the power of <Operand>
286370
287371Example:
288372 variable tVar as number
289- put the exp of the natural log of 100 into tVar -- tVar contains approximately 100
373+ put the exp(ln( 100)) into tVar -- tVar contains approximately 100
290374
291375Tags: Math
292376*/
293377
294378syntax ExpOperator is prefix operator with precedence 1
295- "the" "exp " "of" <Operand: Expression>
379+ "the" "exponential " "of" <Operand: Expression>
296380begin
297381 MCMathEvalExpNumber(Operand, output)
298382end syntax
299383
384+ public handler exp(in pOperand as number) as number
385+ variable tVar as number
386+ MCMathEvalExpNumber(pOperand, tVar)
387+ return tVar
388+ end handler
389+
300390--
301391
302392/*
@@ -378,11 +468,17 @@ Tags: Math
378468*/
379469
380470syntax MinOperator is prefix operator with precedence 5
381- "the" "min " "of" <Left: Expression> "and" <Right: Expression>
471+ "the" "minimum " "of" <Left: Expression> "and" <Right: Expression>
382472begin
383473 MCMathEvalMinNumber(Left, Right, output)
384474end syntax
385475
476+ public handler min(in pX as number, in pY as number) as number
477+ variable tVar as number
478+ MCMathEvalMinNumber(pX, pY, tVar)
479+ return tVar
480+ end handler
481+
386482/*
387483Summary: Max operator.
388484Left: An expression that evaluates to a number.
@@ -394,11 +490,17 @@ Tags: Math
394490*/
395491
396492syntax MaxOperator is prefix operator with precedence 5
397- "the" "max " "of" <Left: Expression> "and" <Right: Expression>
493+ "the" "maximum " "of" <Left: Expression> "and" <Right: Expression>
398494begin
399495 MCMathEvalMaxNumber(Left, Right, output)
400496end syntax
401497
498+ public handler max(in pX as number, in pY as number) as number
499+ variable tVar as number
500+ MCMathEvalMaxNumber(pX, pY, tVar)
501+ return tVar
502+ end handler
503+
402504--
403505
404506/*
0 commit comments