Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML math and significant digits

Featured Replies

  • Commercial Member

I have a basic FSX math question...What's the best way to drop significant digits?I have a number with six digits and want to drop the last two...and reduce the precision.13579.321 -> 13600.000(L:myVar,number) 100 / near 100 *This works, and I use it, but it seems like a lot of trouble(L:myVar,number) 100 divdiv doesn't round the answer...so it won't doIs there a shortcut to do this?Danny

  • Moderator

Danny, I can't think of any more "elegant" or "simple" way myself.Even substituting "ceil" instead of near wouldn't make any real difference... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

If you need to do it often and don't want to write it all out you could make a macro containing 100 / near 100 * and call it after the number you wish to round.

  • Author
  • Commercial Member

Thanks guys, good to know that's how you'd approach the problem.The macro is a good idea...My main concern was some of my statements were becoming very long and difficult to read.So that's an ideal use for a macro :( Danny

  • Moderator
My main concern was some of my statements were becoming very long and difficult to read.So that's an ideal use for a macro :(
Actually, that's the only real purpose for a macro! See my thread regarding the @ExtDigit macro for example. It's an elegant way to extract any digit from any number by simply passing along three parameters: (value,x,y) where x is the nth digit from the right, and y is the number of decimals (if any).

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.