Thread Tools Display Modes
06-07-06, 08:18 AM   #1
Rince
A Murloc Raider
Join Date: May 2006
Posts: 6
floating point

how do i set up the floating point in lua ?

if im calcualating the % of something i get like 12 decimals …
  Reply With Quote
06-07-06, 08:25 AM   #2
JoshBorke
A Chromatic Dragonspawn
 
JoshBorke's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 185
you can use string.format('%.<digits>f',floatingPointNumber) to restrict the number of decimal points to show.
  Reply With Quote
06-07-06, 08:29 AM   #3
Rince
A Murloc Raider
Join Date: May 2006
Posts: 6
okay thx for fast reply - sounds easy
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » floating point


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

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