Discuss Scratch

ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

right now, scratch does its calculations in degrees, which is more practical but is inconvenient for graphs, since graphs work better in radians. So it would be convenient if a block that was something like this was added:
set angle mode to [radians v] ::operators
This block would automatically set stuff like the trig ratios to radians or degrees, removing the need to manually convert every time.
(technically you can achieve this by multiplying everything angle related by 180/pi, but the new block would be more convenient and more readable)

Last edited by ploppiedog (Sept. 10, 2026 12:14:09)

scratchy_boy106
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

What is that
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

scratchy_boy106 wrote:

What is that
The topic of radians is a bit difficult, because you need knowledge on previous topics. A radian is a segment of the circumference (perimeter) of a circle that is equal to the radius (length between center and circumference) of that circle. It is used in more advanced forms of math, but right now the simplest explanation is that it is a much larger degree (1 radian is around 57 degrees).
scratchy_boy106
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

No support, just use this:
turn cw ((dir) * (57)) degrees
You said one radian is 57 degrees.
Why is it 57?
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

scratchy_boy106 wrote:

No support, just use this:
turn cw ((dir) * (57)) degrees
You said one radian is 57 degrees.
Why is it 57?
No, you don't understand what I'm trying to say. I'm talking more about graphs. For example:
set [y] to ([sin v] of (x position)::operators)
The above block would look very different in degrees vs radians. Yes, you could simply multiply by 57 (or multiply by 180/pi for more accuracy), but you would have to repeat this for every time you do this. So, if I had, say, 50 equations that were similar to the one above, I would have to multiply the output by 57 every time. Conversely, the proposed block would instantly complete all of these multiplications instantly. It's like how don't really need the “if on edge, bounce” block but it makes things more convenient.
scratchy_boy106
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

ploppiedog wrote:

scratchy_boy106 wrote:

No support, just use this:
turn cw ((dir) * (57)) degrees
You said one radian is 57 degrees.
Why is it 57?
No, you don't understand what I'm trying to say. I'm talking more about graphs. For example:
set [y] to ([sin v] of (x position)::operators)
The above block would look very different in degrees vs radians. Yes, you could simply multiply by 57 (or multiply by 180/pi for more accuracy), but you would have to repeat this for every time you do this. So, if I had, say, 50 equations that were similar to the one above, I would have to multiply the output by 57 every time. Conversely, the proposed block would instantly complete all of these multiplications instantly. It's like how don't really need the “if on edge, bounce” block but it makes things more convenient.
huh
ChristianScratcher1
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

scratchy_boy106 wrote:

snip
huh
Go on desmos and type the equation “sin x”. The calculator is on radians mode by default. Now press the wrench icon at the top right under the desmos icon and press “degrees” Notice how the graph changes

In radians it would look like this


And in degrees it would look like this


In terms of pi you would have to multiply the angle degree by pi/180 and to convert radians to degree you'd multiply by the reciprocal
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bump
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bump
scratchy_boy106
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

ploppiedog wrote:

bump
Wait 24 hours between bumps!
TimothyLawyer
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

is this how to convert from radians to degrees?

((radians :: custom) * ((180) / (pi))::operators)

e.g.,

define sin of (input) radians
set [output v] to ([sin v] of ((input :: custom) * ((180) / (pi))::operators))
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

TimothyLawyer wrote:

is this how to convert from radians to degrees?

((radians :: custom) * ((180) / (pi))::operators)

e.g.,

define sin of (input) radians
set [output v] to ([sin v] of ((input :: custom) * ((180) / (pi))::operators))
Yes, that is how you could do that, but a block that just allows you to switch between degrees and radians would be much simpler without having to create tons of logic for the other trig functions and stuff, besides I don't think many people know that you have to multiply by 180/pi to convert to radians anyways

Last edited by ploppiedog (Sept. 10, 2026 12:15:28)

ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bump
localrulebreaker
Scratcher
100+ posts

Allow us to switch between degrees and radians for equations

scratchy_boy106 wrote:

ploppiedog wrote:

scratchy_boy106 wrote:

No support, just use this:
turn cw ((dir) * (57)) degrees
You said one radian is 57 degrees.
Why is it 57?
No, you don't understand what I'm trying to say. I'm talking more about graphs. For example:
set [y] to ([sin v] of (x position)::operators)
The above block would look very different in degrees vs radians. Yes, you could simply multiply by 57 (or multiply by 180/pi for more accuracy), but you would have to repeat this for every time you do this. So, if I had, say, 50 equations that were similar to the one above, I would have to multiply the output by 57 every time. Conversely, the proposed block would instantly complete all of these multiplications instantly. It's like how don't really need the “if on edge, bounce” block but it makes things more convenient.
huh
You don't understand. It is not for you.
medians
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

scratchy_boy106 wrote:

huh
What part of the post are you asking about?
bitmap_caketin
Scratcher
100+ posts

Allow us to switch between degrees and radians for equations

Would it affect:
point in direction ( )
(direction)
turn cw () degrees
turn ccw () degrees
The last two do specify degrees, would that automatically change?

(I do know this is important for trigonometry rather than visual effects, but you might have:
point in direction ([asin v] of (var))
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bitmap_caketin wrote:

Would it affect:
point in direction ( )
(direction)
turn cw () degrees
turn ccw () degrees
The last two do specify degrees, would that automatically change?

(I do know this is important for trigonometry rather than visual effects, but you might have:
point in direction ([asin v] of (var))
I feel like it would only affect the stuff in the operations tab (stuff that would be more reasonable to be switchable between radians and degrees) like the trig functions, I don't think it would be useful to affect rotation, so maybe it could be another block such as:
switch angle mode to [degrees v] for rotations ::motion
switch angle mode to [degrees v] for equations ::operators
(this is a bit of a stretch though, I might personally stick to just the equation one and just have people manually change the rotations by multiplying the value by pi/180)

Edit: I also realized you could do something like this:
define Turn (num) radians clockwise
turn cw ((num) * ((180) / (3.14))) degrees

Last edited by ploppiedog (Sept. 10, 2026 12:31:51)

ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bump
ploppiedog
Scratcher
28 posts

Allow us to switch between degrees and radians for equations

bump
TimothyLawyer
Scratcher
1000+ posts

Allow us to switch between degrees and radians for equations

Powered by DjangoBB