Radians/draft: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Blocco
New page: {{EmphasisBox|<b>This article is about an advanced topic.</b>|red|dark=yes}} Radians and degrees are units of measurement for angles. You use radians for many things, like figuring out t...
 
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
Tags: mobile web edit mobile edit
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{delete|Irrelevant content, and worse than the original page}}
{{EmphasisBox|<b>This article is about an advanced topic.</b>|red|dark=yes}}
{{EmphasisBox|<b>This article is about an advanced topic.</b>|red|dark=yes}}


Line 10: Line 12:
== How do we use them? ==
== How do we use them? ==


Radians and degrees can be used interchangebly, as there is a formula to convert between the two.  This formula can be found by observing the <pre>math.rad</pre> and <pre>math.deg</pre> functions, as they convert degrees into radians, and vice versa.
Radians and degrees can be used interchangebly, as there is a formula to convert between the two.  This formula can be found by observing the {{`|math.rad}} and {{`|math.deg}} functions, as they convert degrees into radians, and vice versa.


Most people like using degrees for complicated angles, and in Roblox, most people will use degrees to simplify the CFrame that they are using.
Most people like using degrees for complicated angles, and in Roblox, most people will use degrees to simplify the CFrame that they are using.
Line 16: Line 18:
=== Radians ===
=== Radians ===


Radians can be used in Roblox by using the function <pre>math.rad</pre> and inputting a value in degrees.  That function will output the correct converted value from degrees to radians.  From this, the CFrame function <pre>CFrame.Angles</pre> (which only uses radians for it's input) can create a rotation for a CFrame.
Radians can be used in Roblox by using the function {{`|math.rad}} and inputting a value in degrees.  That function will output the correct converted value from degrees to radians.  From this, the CFrame function {{`|CFrame.Angles}} (which only uses radians for it's input) can create a rotation for a CFrame.


== Advanced ==
== Advanced ==
Line 24: Line 26:
For example:
For example:


<code>
0 Degrees => 0 radians<br>
0 Degrees => 0 radians<br>
1 Degree => 0.017453292519943295769236907684886 Radians<br>
1 Degree => 0.017453292519943295769236907684886 Radians
2 Degrees => 0.034906585039886591538473815369772 Radians<br>
2 Degrees => 0.034906585039886591538473815369772 Radians
3 Degrees => 0.052359877559829887307710723054658 Radians<br>
3 Degrees => 0.052359877559829887307710723054658 Radians
4 Degrees => 0.069813170079773183076947630739545 Radians<br>
4 Degrees => 0.069813170079773183076947630739545 Radians
</syntaxhighlight>
 
And the reverse:


And the reverse:<br>
<code>
1 Radian => 57.295779513082320876798154814105 Degrees<br>
1 Radian => 57.295779513082320876798154814105 Degrees
2 Radians => 114.59155902616464175359630962821 Degrees<br>
2 Radians => 114.59155902616464175359630962821 Degrees
3 Radians => 171.88733853924696263039446444232 Degrees<br>
3 Radians => 171.88733853924696263039446444232 Degrees
4 Radians => 229.18311805232928350719261925642 Degrees<br>
4 Radians => 229.18311805232928350719261925642 Degrees
</syntaxhighlight>


And so on.  You can convert Degrees to Radians and Radians to Degrees using [http://www.10ticks.co.uk/radianConverter.aspx online conversion tools], with your calculator, or with the following functions:
And so on.  You can convert Degrees to Radians and Radians to Degrees using [http://www.10ticks.co.uk/radianConverter.aspx online conversion tools], with your calculator, or with the following number and functions:


math.pi<br>
math.pi<br>
Roblox reads this as Pi, which is 3.141592654.<br>
Roblox reads this as Pi, which is approximately 3.141592654.


math.rad (x)<br>
math.rad (x)<br>
Converts x (in degrees) into Radians. Example: math.rad(90) results in  1.5707963267.<br>
Converts x (in degrees) into Radians. Example: math.rad(90) results in  1.5707963267.


math.deg (x)<br>
math.deg (x)<br>
Converts x (in Radians) into degrees. Example: math.deg(3.141592654) results in 180.<br>
Converts x (in Radians) into degrees. Example: math.deg(3.141592654) results in 180.


== See Also ==
== See Also ==

Latest revision as of 04:54, 27 April 2023

This page has been nominated for deletion
Reason: Irrelevant content, and worse than the original page
This article is about an advanced topic.

Radians and degrees are units of measurement for angles. You use radians for many things, like figuring out the size of an angle on a triangle, denoting and using rotations and other cool stuff.

Why do we need them?

Radians and degrees are simple a way to use and describe angles with specific numbers. They are used a lot in real life and help us calculate how to build something correctly. You can even use them on Roblox to make cool CFramed art.

How do we use them?

Radians and degrees can be used interchangebly, as there is a formula to convert between the two. This formula can be found by observing the math.rad and math.deg functions, as they convert degrees into radians, and vice versa.

Most people like using degrees for complicated angles, and in Roblox, most people will use degrees to simplify the CFrame that they are using.

Radians

Radians can be used in Roblox by using the function math.rad and inputting a value in degrees. That function will output the correct converted value from degrees to radians. From this, the CFrame function CFrame.Angles (which only uses radians for it's input) can create a rotation for a CFrame.

Advanced

The above examples have used whole numbers and rather clean fractions. Unfortunately, if you want to make something like a "spiralling staircase", you will need to work with much finer "pie slices" than the ones above, and you will get decimals. However, the principle and the computation is the same:

For example:

0 Degrees => 0 radians
1 Degree => 0.017453292519943295769236907684886 Radians 2 Degrees => 0.034906585039886591538473815369772 Radians 3 Degrees => 0.052359877559829887307710723054658 Radians 4 Degrees => 0.069813170079773183076947630739545 Radians </syntaxhighlight>

And the reverse:

1 Radian => 57.295779513082320876798154814105 Degrees 2 Radians => 114.59155902616464175359630962821 Degrees 3 Radians => 171.88733853924696263039446444232 Degrees 4 Radians => 229.18311805232928350719261925642 Degrees </syntaxhighlight>

And so on. You can convert Degrees to Radians and Radians to Degrees using online conversion tools, with your calculator, or with the following number and functions:

math.pi
Roblox reads this as Pi, which is approximately 3.141592654.

math.rad (x)
Converts x (in degrees) into Radians. Example: math.rad(90) results in 1.5707963267.

math.deg (x)
Converts x (in Radians) into degrees. Example: math.deg(3.141592654) results in 180.

See Also

Radians

Degrees

Radian Degree Converter

Table of polyhedron dihedral angles