Raised This Month: $ Target: $400
 0% 

convert message "short" to float


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 09-23-2007 , 15:51   convert message "short" to float
Reply With Quote #1

i am catching "short" value from a screenfade message, and i want to convert it to float

how to do this ?

like:

new fvalue = read_data(2) / some_value // divide it so fvalue is max 1.0

but i cant do this couse read_data(2) is something like 3>>15
__________________
Voi is offline
AlMod
Member
Join Date: Nov 2006
Old 09-23-2007 , 23:08   Re: convert message "short" to float
Reply With Quote #2

convert to float:
Quote:
new a = 15
new Float: f_a = float(a)
convert back to integer
Quote:
a = floatround(f_a)
AlMod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode