Thread Tools Display Modes
01-20-07, 01:34 PM   #1
tatsudoshi
A Deviate Faerie Dragon
 
tatsudoshi's Avatar
Join Date: Jan 2007
Posts: 15
Question Number: Decimal limitation?

Hey fellow codefreaks
Am new to LUA, as you probably can tell else I would not ask such a question

Well since LUA only have floating point numbers, how do I limit a number to ie only have two decimals?
  Reply With Quote
01-20-07, 01:41 PM   #2
Syzgyn
An Aku'mai Servant
 
Syzgyn's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 37
Code:
format("%.2f", number)
More info at the bottom of the page here:
http://www.lua.org/pil/20.html
  Reply With Quote
01-20-07, 01:47 PM   #3
tatsudoshi
A Deviate Faerie Dragon
 
tatsudoshi's Avatar
Join Date: Jan 2007
Posts: 15
Ah I see. Format for, yea, formatting the contens. Got it
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Number: Decimal limitation?

Thread Tools
Display Modes

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