1/* math.asc -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2009 */
2
3/*
4
5Copyright (c) 2005-2009 Made to Order Software Corp.
6
7Permission is hereby granted, free of charge, to any
8person obtaining a copy of this software and
9associated documentation files (the "Software"), to
10deal in the Software without restriction, including
11without limitation the rights to use, copy, modify,
12merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom
14the Software is furnished to do so, subject to the
15following conditions:
16
17The above copyright notice and this permission notice
18shall be included in all copies or substantial
19portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
22ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
23LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
24FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
25EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
27WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30SOFTWARE.
31
32*/
33
34
35// To use Mathematical functions, since these are static, do:
36//
37//		result = Math.<name>(<params>);
38//
39intrinsic package Global
40{
41	class Matrix
42	{
43		var a : Double;
44		var b : Double;
45		var c : Double;
46		var d : Double;
47		var e : Double;
48		var f : Double;
49		var g : Double;
50		var h : Double;
51		var i : Double;
52	}
53
54	class Math
55	{
56		static function abs(const var in x : Double) : Double;
57		static function acos(const var in x : Double) : Double;
58		static function asin(const var in x : Double) : Double;
59		static function atan(const var in x : Double) : Double;
60		static function atan2(const var in y : Double, const var in x : Double) : Double;
61		static function ceil(const var in x : Double) : Double;
62		static function cos(const var in x : Double) : Double;
63		static function exp(const var in x : Double) : Double;
64		static function floor(const var in x : Double) : Double;
65		static function log(const var in x : Double) : Double;
66		static function max(const var in x : Double, const var in y : Double) : Double;
67		static function min(const var in x : Double, const var in y : Double) : Double;
68		static function pow(const var in x : Double, const var in y : Double) : Double;
69		static function random(Void) : Double;
70		static function round(const var in x : Double) : Double;
71		static function sin(const var in x : Double) : Double;
72		static function sqrt(const var in x : Double) : Double;
73		static function tan(const var in x : Double) : Double;
74
75		const var E : Double;
76		const var LN2 : Double;
77		const var LOG2E : Double;
78		const var LN10 : Double;
79		const var LOG10E : Double;
80		const var PI : Double;
81		const var SQRT1_2 : Double;
82		const var SQRT2 : Double;
83	}
84}
85
86
87