Discuss Scratch

ScratchCat_50
Scratcher
100+ posts

What do the math blocks mean?

What do those mean
([Abs v] of (9))  //gives absolute value
([Floor v] of (9)) //gives round down
([Ceiling v] of (9)) //gives round up
([Sqrt v] of (9)) // square root
([Sin v] of (9)) // ?
([Cos v] of (9)) // ?
([Tan v] of (9)) // ?
([Asin v] of (9)) //?
([Acos v] of (9)) // ?
([Atan v] of (9)) //?
([In v] of (9)) //?
([Log v] of (9)) //?
([E^ v] of (9)) //?
([10^ v] of (9)) //?
Thise are supposed to be green

Last edited by ScratchCat_50 (July 11, 2022 17:58:27)

Socialix
Scratcher
1000+ posts

What do the math blocks mean?

10^ is basically 10^INSERTNUMBER, so if you were to type 2, it would be 10 x 10 = 100.
musicROCKS013
Scratcher
1000+ posts

What do the math blocks mean?

Many of these are trig.
Quantum-Cat
Scratcher
1000+ posts

What do the math blocks mean?

Here are some brief explanations:
  • Sin, cos, tan, asin, acos and atan are functions that are used in trigonometry (the latter 3 are the inverse of the first 3, e.g. asin(sin(90)) = 90).
  • 10^() outputs 10 to the power of the input, so for instance 10^(2) is 100 because 10*10 is 100 (a single ^ means “to the power of”). log() is short for logarithm, and in this case, outputs the power of 10 needed to get the input (this means it is the inverse of 10^(), so log(100) = 100, because 10^2 is 100). An example use case is this:

    ([10^ v] of ((4)*([log v] of (3))) :: operators) // this is the same as 3^4 which gives 81, instead of doing 3*3*3*3

  • “e” is a constant (similar to pi) that equals approximately 2.718. ln() is the natural logarithm, and similar to log(), it is the inverse of e^(), so ln(e^(4)) = 4)

Last edited by Quantum-Cat (July 11, 2022 18:52:24)

ScratchCat_50
Scratcher
100+ posts

What do the math blocks mean?

Thanks

Powered by DjangoBB