Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / matrix 4 cast commands

Author
Message
basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 1st Sep 2011 14:23
can someone give me an example comes coding about a useful use of the cast commands.

Quote: "CAST DOUBLE FLOAT TO DOUBLE INTEGER
CAST DOUBLE INTEGER TO DOUBLE FLOAT
CAST DWORD TO FLOAT
CAST FLOAT TO DWORD "
IanM
Retired Moderator
17
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Sep 2011 15:32
They really aren't that useful to the general user.

These four functions are a way of converting a bit pattern to a float/double float, or creating a bit pattern from a float/double float.

Unless you are going to be doing bit manipulation of floats/double floats, then they are of no use to you.

Here's a single example that always gives you a negative value of a float:


Of course, that could be replaced with 'f = -abs(f)', but that's the idea - to manipulate the bit pattern directly.

Remember that most of my commands and function do things that *I* find useful, and may or may not be useful to anyone else.

basjak
9
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 2nd Sep 2011 01:07
thank you very much Ian. I like to know all the ins and outs.
sound driver
8
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 2nd Sep 2011 12:21
Great information! I agree most of you here and I’ve been looking for something like this for a while now. Thanks!

Login to post a reply

Server time is: 2019-10-15 09:50:10
Your offset time is: 2019-10-15 09:50:10