View Single Post
11-21-13, 07:00 AM   #14
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
Originally Posted by Clamsoda View Post
Use the float parameter of format.

Lua Code:
  1. local truncatedDecimal = format("%.2f", 3.14159265359)
so in turn my code should look something like this correct?

Lua Code:
  1. local resolHeight = GetScreenHeight()
  2. local resolWidth = GetScreenWidth()
  3. local aspectRatio = (resolWidth/resolHeight)
  4. print ("if this function works your Aspect ratio is", format("%.2f", aspectRatio))
  Reply With Quote