AddOns
AddOn Manager
Latest 200
Browse
Upload AddOn
Search AddOns
Projects
Author Portals
Git Repositories
SVN Repositories
Options
Email Feeds
Preference
Download History
News
Forums
New posts
Today's Posts
Search Forum
Categories
General
AddOns, Comps, Macros
Featured Projects
Developer
Site Forums
Mark Forums Read
Subscribed Threads
Open Buddy List
Members List
Help
Login
Sign up
WoWInterface
»
Developer Discussions
»
Lua/XML Help
»
Number: Decimal limitation?
Go to Page...
Reply
View First Unread
Thread Tools
Display Modes
01-20-07, 01:34 PM
#
1
tatsudoshi
A Deviate Faerie Dragon
Join Date: Jan 2007
Posts: 15
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?
tatsudoshi
View Public Profile
Send a private message to tatsudoshi
Find More Posts by tatsudoshi
01-20-07, 01:41 PM
#
2
Syzgyn
An Aku'mai Servant
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
Syzgyn
View Public Profile
Send a private message to Syzgyn
Find More Posts by Syzgyn
01-20-07, 01:47 PM
#
3
tatsudoshi
A Deviate Faerie Dragon
Join Date: Jan 2007
Posts: 15
Ah I see. Format for, yea, formatting the contens. Got it
tatsudoshi
View Public Profile
Send a private message to tatsudoshi
Find More Posts by tatsudoshi
Reply
WoWInterface
»
Developer Discussions
»
Lua/XML Help
» Number: Decimal limitation?
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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