ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
|
Downloads |
Tips and Tricks Share helpful modeling ideas |
#1
|
|||
|
|||
Max Double or Max Int function in Flexscript?
Hi, I'm wondering if there is a way to reference the maximum value for a double in Flexscript. I've used a long string of 9's in the past, but just curious if there was a cleaner way. My other option is to use a global macro, #define statement, so for that I would just need to know the limits for those data types.
Thank you, Sean |
#2
|
|||
|
|||
A macro is fine - all the integers up to 9007199254740992.0 (2^53) can be represented with a double, but at that point there's no precision left for decimals. After that only the even ones up to 2^53. The integer max is 2147483647.
|
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Sean Browning (03-28-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Double Hoist | stmyint | Container Terminal (CT) Library | 5 | 11-05-2012 04:25 PM |
Double Hoist Cranes | James Morley | Container Terminal (CT) Library | 3 | 10-22-2012 11:40 PM |
How to change FlexScript node function | luis quinones | Tips and Tricks | 1 | 09-14-2010 03:50 AM |
C++ function "ceil" in Flexscript | Jörg Vogel | Q&A | 4 | 10-01-2008 10:17 AM |
Double click to execute the onpress function | sophia yao | Q&A | 4 | 07-15-2008 08:53 PM |