Pages: 1
Author Topic: Where do I find the floor Function...  (79,278 Views)
Offline (Unknown gender) OniLink10

Member
Joined: Jul 2008
Posts: 68
View profile
Posted on: September 14, 2008, 06:24:24 AM
Where can I find it in the ENIGMA SHELL? I need to find it for another Project I'm doing.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #1 Posted on: September 14, 2008, 04:17:10 PM
Here's an EDL equivelent...
var real, str, decpos, newstr;
real=argument0;
str=string(real);
decpos=string_pos('.',str);
newstr='';
for (i=1;i<decpos;i+=1;)
{
newstr+=string_char_at(i,str);
}
return real(newstr);
Offline (Unknown gender) OniLink10

Member
Joined: Jul 2008
Posts: 68
View profile
Reply #2 Posted on: September 14, 2008, 07:08:47 PM
The C++ version used in the SHELL would be easier to convert to C#... Ah well, I'll give it a shot!
Quote from: RetroX on September 14, 2008, 04:17:10 PM
Here's an EDL equivelent...
var real, str, decpos, newstr;
real=argument0;
str=string(real);
decpos=string_pos('.',str);
newstr='';
for (i=1;i<decpos;i+=1;)
{
newstr+=string_char_at(i,str);
}
return real(newstr);

Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #3 Posted on: September 14, 2008, 08:29:32 PM
euh... why on earth would you convert to string? that just wastes time. In C(++) you could just cast to int and subtract that from the original, you can probably do the same thing in C#.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #4 Posted on: September 14, 2008, 08:30:52 PM
It's in math.h.
Offline (Unknown gender) Austin

Member
Joined: Apr 2008
Posts: 32
View profile
Reply #5 Posted on: September 15, 2008, 05:23:43 AM
I believe that it is on the ceiling...
Offline (Unknown gender) sprintf()

Past Contributor
Joined: Apr 2008
Posts: 72
View profile
Reply #6 Posted on: September 15, 2008, 06:36:16 PM
ROFLMAO

<.<
Offline (Unknown gender) serprex

Smooth ER
Developer
Joined: Apr 2008
Posts: 106
View profile WWW
Reply #7 Posted on: September 21, 2008, 05:11:11 PM
Retro, how do you even think these things up? You might have a place in an obfuscated GML contest. round(x-.5) is much more obvious in meaning
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #8 Posted on: September 21, 2008, 07:20:39 PM
I am a box filled with secrets.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #9 Posted on: September 27, 2008, 09:11:40 PM
:S

I guess I've come a long way.

At any rate, floor() is (int) or int( )...
Pages: 1