Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Rounding floats to a set number of significant figures
  RSS 2.0 ATOM  

Rounding floats to a set number of significant figures
Rate this thread
 
36208
 
Permlink of this thread  
avatar
  • Total Posts: 46
  • Joined: 01 October 2007 09:42 PM

I’ve been looking for a function that can do this and it seems there isn’t any (at least not outlined in the help). I also searched these forums to no avail…

We’ve got a function doing this but it is painfully slow, especially when the resulting value is in exponential notation as it needs to parse it as a string.

Anyone know how I can do this without sucking all of my computer’s valuable juice?

CL Audio
3dsMax 2009 SP1



---
3DSMax 2009 SP1

Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

formattedPrint <valueformat:"format string"

The “format string” is very similar to those used in the standard printf routine in C.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Attachment Attachment
Replies: 0
avatar

Thanks Steve!



---
3DSMax 2009 SP1

Replies: 0