Subversion Repositories Kolibri OS

Rev

Rev 5676 | Rev 7086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5676 Rev 5730
Line 13... Line 13...
13
	float cos(float x);
13
	float cos(float x);
14
	float sin(float x);
14
	float sin(float x);
15
	float sqrt(float x);
15
	float sqrt(float x);
16
	float tan(float x);
16
	float tan(float x);
17
	float abs(float x);
17
	float abs(float x);
-
 
18
	float floor(float x);
-
 
19
	signed round(float x);
-
 
20
	signed ceil(float x);
18
}math;
21
}math;
-
 
22
:signed MATH::round(float x)
-
 
23
{
-
 
24
	x+=0.6;
-
 
25
	return x;
-
 
26
}
-
 
27
:signed MATH::ceil(float x)
-
 
28
{
-
 
29
	dword z;
-
 
30
	float tmp;
-
 
31
	z = x;
-
 
32
	tmp = z;
-
 
33
	IF(tmp
-
 
34
	return z;
-
 
35
}
-
 
36
:float MATH::floor(float x)
-
 
37
{
-
 
38
	signed long z;
-
 
39
	z = x;
-
 
40
	IF(z==x)return x;
-
 
41
	IF(z<0) return z-1;
-
 
42
	return z;
-
 
43
}
19
:float MATH::abs(float x)
44
:float MATH::abs(float x)
20
{
45
{
21
	IF(x<0)return -x;
46
	IF(x<0)return -x;
22
	return x;
47
	return x;
23
}
48
}