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: any mlg math people

Previous Thread :: Next Thread 
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
26 Jun 2016 05:37 AM
styles = {
Linear = {p0 = 0; v0 = 1; p1 = 1; v1 = 1};
Smooth = {p0 = 0; v0 = 0; p1 = 0; v1 = 0};
Accelerate = {p0 = 0; v0 = 0; p1 = 1; v1 = 1};
Decelerate = {p0 = 0; v0 = 1; p1 = 1; v1 = 0};
}

getAlpha = function(a, style)
local i = 1 - a
local p0 = styles[style]["p0"]
local v0 = styles[style]["v0"]
local p1 = styles[style]["p1"]
local v1 = styles[style]["v1"]

return p0 * i * i * i + (3 * p0 + v0) * a * i * i + (3 * p1 - v1) * a * a * i + p1 * a * a *a
end


Ran this for each style, and they all returned this:
0.016666666666667

print(1/60,styles['//StyleHere//'])


- Isosta
Report Abuse
Iliuminatis is not online. Iliuminatis
Joined: 30 Nov 2008
Total Posts: 1524
26 Jun 2016 05:46 AM
You've got some edgy code here ( ͡° ͜ʖ ͡°)
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
26 Jun 2016 05:47 AM
iwot


- Isosta
Report Abuse
GurubashiBerserker is not online. GurubashiBerserker
Joined: 31 May 2016
Total Posts: 19
26 Jun 2016 05:50 AM
Why do you do i*i*i and a*a*a instead of (i^3)?


Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
26 Jun 2016 05:52 AM
@gur,

irrelevant idk how to math

[6:49:22 AM] Tim Deeter: each style, like accelerate should be quad in
[6:49:27 AM] Tim Deeter: decelerate quad out
[6:49:37 AM] Tim Deeter: linear should return .01666666666666666666666666666666666666667
[6:49:42 AM] Tim Deeter: the others shouldn't


- Isosta
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
26 Jun 2016 06:12 AM
What's the point of this line: print(1/60,styles['//StyleHere//'])

That will just print 0.016666666667 followed by the memory address of the table (if it exists)
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
26 Jun 2016 06:15 AM
for i = 0, 1, 0.1 do
print('Linear', getAlpha(i, 'Linear')) -- Works
end

for i = 0, 1, 0.1 do
print('Smooth', getAlpha(i, 'Smooth')) -- Does not work
end

for i = 0, 1, 0.1 do
print('Accelerate', getAlpha(i, 'Accelerate')) -- Works
end

for i = 0, 1, 0.1 do
print('Decelerate', getAlpha(i, 'Decelerate')) -- Works
end
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
26 Jun 2016 06:18 AM
omfg i didn't put it in a getAlpha function im shooting myself


- Isosta
Report Abuse
Iliuminatis is not online. Iliuminatis
Joined: 30 Nov 2008
Total Posts: 1524
26 Jun 2016 06:28 AM
rest in peace, brave coder ( ͡° ͜ʖ ͡°)
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