|
| 13 Apr 2013 08:27 PM |
| I need help with turning High numbers such as: 10 to 1, so if the number is 5 then it will make an output of 0.5, basically turning the value down. any help? |
|
|
| Report Abuse |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 13 Apr 2013 08:28 PM |
You mean bringing it back one?
Num/10 should do it. |
|
|
| Report Abuse |
|
|
| 13 Apr 2013 08:48 PM |
I'm playing around with metatables. . .
local mTable = { __div = function( Table ) local Quotients = {} for Index, Number in pairs( Table ) do Quotients[ Index ] = Number/10 end return Quotients end } local Dividends = setmetatable( { 1, 5, 10 }, mTable) print( unpack( Dividends / 10 ) )
But like Dek said, you would just want to divide your number by ten, as that seems to be your constant.
(╯°□°)> KMXD |
|
|
| Report Abuse |
|