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: I made a pythagorean theorem calculator...

Previous Thread :: Next Thread 
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
11 Sep 2012 11:38 AM
So it basically calculates the missing side for you. All you need to do is to insert at least 2 values - doesn't really matter if it's one of the shorter sides or the hypotenuse.

Can anyone please check if it's accurate?

http://www.roblox.com/Pythagorean-Theorem-Calculator-item?id=92517117

Is it accurate?

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
11 Sep 2012 11:40 AM
why would it be wrong?

it'd probably be like 10 lines of code, none of which particularly complicated
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
11 Sep 2012 11:43 AM
So it's accurate?
:D

I could use this for my homework! (Which secretly is part of the reason why I made it lol)

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
11 Sep 2012 11:43 AM
local hyp = 2
local adj = 3

if hyp == nil then
print(math.sqrt(adj^2+opp^2))
elseif adj == nil then
print(math.sqrt(hyp^2-opp^2))
elseif opp == nil then
print(math.sqrt(hyp^2-adj^2))
end

Probably can be made better but that's pretty much all you'd need.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Sep 2012 11:46 AM
^

lol u lied n000b

anyway

i dont mean to spam or anything but...

Scripting helpers is dodgey

yes, this again.

yes, i am spamming

wahtever n00b

why this not giving KOs?

p.CharacterRemoving:connect(function()
if p.Character:FindFirstChild("Humanoid") then
if p.Character.Humanoid:FindFirstChild("creator") then
if p.Character.Humanoid.creator.Value:FindFirstChild("leaderstats") then
p.Character.Humanoid.creator.Value.leaderstats.Kills = p.Character.Humanoid.creator.Value.leaderstats.Kills + 1
end
end
end
PlayerStats.Deaths.Value = PlayerStats.Deaths.Value + 1
end)

p is a player
it gives deaths but not kills
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
11 Sep 2012 11:47 AM
lateposted
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
11 Sep 2012 12:26 PM
"p.Character.Humanoid.creator.Value.leaderstats.Kills = "

Bam.

Back on topic... What's the equation for finding out the area of a right-angled triangle again?

It's just multiplying the 2 shorter sides and dividing it by 2... right?

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Sep 2012 12:52 PM
"It's just multiplying the 2 shorter sides and dividing it by 2... right?"

yes
Report Abuse
ThePC8110 is not online. ThePC8110
Joined: 04 Jun 2011
Total Posts: 486
11 Sep 2012 01:08 PM
Ok, anyone know formulas for Cos, Sin, and Tan, or to a further arc cos, arc sin, and arc tan? (I'm not that keen on using lua's math library.)
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Sep 2012 01:12 PM
"Ok, anyone know formulas for Cos, Sin, and Tan, or to a further arc cos, arc sin, and arc tan?"

yeah you just us-

"(I'm not that keen on using lua's math library.)"

uh

why
Report Abuse
ThePC8110 is not online. ThePC8110
Joined: 04 Jun 2011
Total Posts: 486
11 Sep 2012 01:13 PM
Just habbit really, I don't tend to use it.
Report Abuse
Seranok is online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
11 Sep 2012 01:15 PM
That's a really bad habit. You need to use libraries otherwise you will spend the rest of your life writing the most basic things from scratch...
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Sep 2012 01:19 PM
as far as I'm aware there are no formulae for trig functions that don't involve infinite summation

just use the library functions math.sin, math.cos, math.asin etc
Report Abuse
ThePC8110 is not online. ThePC8110
Joined: 04 Jun 2011
Total Posts: 486
11 Sep 2012 01:28 PM
@Sen, I read your post saying you need to stop using librarys, so a small bit hypocritical, but I will certainly take your advice.
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
11 Sep 2012 01:30 PM
Core libraries ~= General libraries

The core functions are mostly implemented on the C side so they will be MAGNITUDES faster than you writing your own.
Report Abuse
jasquell is not online. jasquell
Joined: 29 Mar 2011
Total Posts: 2541
11 Sep 2012 09:38 PM
cool,
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
12 Sep 2012 07:02 AM
http://www.roblox.com/Pythagorean-Theorom-item?id=68162123

hurr dur
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
12 Sep 2012 07:22 AM
fuuuuuuuuuuuu
mine is more accurate i think because it doesn't use studs... i don't even know what studs is... 1 stud == 1cm? lolz

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
12 Sep 2012 07:43 AM
^

no wai.

ur callin us all 6cm tall?

hrmph
Report Abuse
Maelstronomer is not online. Maelstronomer
Joined: 07 Jun 2008
Total Posts: 7649
12 Sep 2012 07:47 AM
20 studs is a meter iirc from the blog.
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
12 Sep 2012 07:47 AM
Correction: 5cm

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
12 Sep 2012 10:33 AM
^

no wai

ur callin us 60cm tall?

nope.avi
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
12 Sep 2012 10:38 AM
1 stud == 10 cm? lolwut

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
12 Sep 2012 10:40 AM
OK, let's say that the average height of a person is about 1.65 metres. So 1.65 / 6 = 0.275 and then to get in cm we multiply by 100 and 1 stud is about 27cm.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
12 Sep 2012 11:53 AM
so about a foot
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