Raised This Month: $ Target: $400
 0% 

Efficient way to cut decimals from a float


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2009 , 02:24   Efficient way to cut decimals from a float
Reply With Quote #1

Hello, is there a way to cut decimals from a float ?

Basically, float( floatround( fValue ) ) just sucks.


PHP Code:
    entity_get_vector(idEV_VEC_velocityvecVel)
    
floatsqroot(vecVel[0]*vecVel[0] + vecVel[1]*vecVel[1]) 
I want the last value to be XXX.0
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-10-2009 at 02:33.
ConnorMcLeod is offline
 



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 13:50.


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