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
 

Re: Math Library Members

Previous Thread :: Next Thread 
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
26 Nov 2011 12:31 PM
I'm going to be making a library of math functions that can be used in addition to the ones that are already included in Lua's standard math library, however I'd like to get a list of functions to implement. Please put your suggestions, and a brief description of what that function would do. I'll release the library when I'm done with it.


----------
    ~ pwendu46, the unicorn ~
Report Abuse
DonnyTheDemented is not online. DonnyTheDemented
Joined: 29 May 2010
Total Posts: 1413
26 Nov 2011 12:35 PM
You should make functions that can solve functions like this:
y^2+4xy+5=x
Report Abuse
purplediva8 is not online. purplediva8
Joined: 07 Jul 2011
Total Posts: 684
26 Nov 2011 12:39 PM
The function that DonnyTheDemented put is definitly hard for me.He's good at functions like this
~purplediva8~
Report Abuse
TaslemGuy is not online. TaslemGuy
Joined: 10 Jun 2009
Total Posts: 12174
26 Nov 2011 01:06 PM
@Donny:

(A) "y^2+4xy+5=x" is not a function.

(B) Define "like." Other hyperbolas?
Report Abuse
TaslemGuy is not online. TaslemGuy
Joined: 10 Jun 2009
Total Posts: 12174
26 Nov 2011 01:08 PM
Oh, wait. Yes, it is a function, x(y) = (y*y + 5) / (1 - 4y), y ~= 1/4

Regardless, you need to be more specific.
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
26 Nov 2011 01:10 PM
-Slerp
This lerps unit vectors, but instead of just making a line from a to b, it "rotates" the unit vector.
Heres the code for it (you can improve):

function Slerp(a,b,t) --slerps from a to b, given alpha (t) between 0 and 1
if t==1 then return b end
local dot = a:Dot(b)
local angle=math.acos(dot)*t
if angle==0 then
return a
end
local c=(b - a*dot).unit
return a*math.cos(angle) + c*math.sin(angle)
end


-More vector3 functions (make these for numbers too i guess)
*Clamp(myvec,Vector3.new(0,0,0),Vector3.new(10,10,10))
clamps each component of myvec between components of first and second vector.
*VectorAbs(vec)
returns vector with all components positive
*VectorPolarity(vec)
returns vector with each component being -1,0 or 1, depending on whether the corresponding component of vec is negative, 0 or positive.

-Bezier curve functions so you can smooth choor paths. (give few vector3's and a ton of variables, get a list of more vector3s that form a smoothis curve) This one might be difficult

-A ton of super efficient sorting functions you found from the dark corner of google.
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
26 Nov 2011 03:20 PM
"-Bezier curve functions so you can smooth choor paths. (give few vector3's and a ton of variables, get a list of more vector3s that form a smoothis curve) This one might be difficult"

Uhh...what is a bezier curve? I may not implement this one.


----------
    ~ pwendu46, the unicorn ~
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