generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Creating a table filled with math's functions

Previous Thread :: Next Thread 
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Aug 2015 01:20 PM
How could I do this, using unpack(math) or looping through math doesnt work
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
22 Aug 2015 01:21 PM
First why?
Second http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Aug 2015 01:28 PM
Not what math had, I meant the functions. I want to insert all of the functions inside a new table so I can add on to it
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Aug 2015 01:35 PM
bump
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
22 Aug 2015 01:36 PM
u don't
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
22 Aug 2015 01:37 PM
You have to add them by hand. The link above lists all the math functions so you just basically have to copy paste.
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Aug 2015 01:37 PM
ive seen it before you pepperoni
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Aug 2015 01:37 PM
Dang, see you in 3 years
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
22 Aug 2015 01:38 PM
@Sensei

Alternatively you could create a wrapper for the math library
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
22 Aug 2015 02:26 PM
local NewMath = {}
setmetatable(NewMath,{__index=math})

then add your functions
Report Abuse
OrangeKitten is not online. OrangeKitten
Joined: 12 Jul 2007
Total Posts: 383
22 Aug 2015 02:35 PM
Going off what he said

local Math = {
add = function(...)
local Tuple = {...}
local Num = 0
for i = 1,#Tuple do
Num = Num + Tuple[i]
end
return Num
end
}
setmetatable(
Math,
{__index = math}
)
return Math
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image