Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » what are these blocks? complex operator ones
- somelittlepups
-
Scratcher
9 posts
what are these blocks? complex operator ones
what does this block mean? the help thing says: “computes a function” with nothing else. i don't have a clue what it does.
And i don't know why that is blue instead of green.
([ v] of (9))
And i don't know why that is blue instead of green.
- somelittlepups
-
Scratcher
9 posts
what are these blocks? complex operator ones
Thank You, RachelandMicheal, that was very helpful!
Last edited by somelittlepups (Dec. 23, 2016 12:01:54)
- theonlygusti
-
Scratcher
1000+ posts
what are these blocks? complex operator ones
It is blue instead of green because there is also a blue one xD If you look under the “sensing” tab in the blocks palette.
Anyway, they are all complex (?) mathematical functions.
Anyway, they are all complex (?) mathematical functions.
([abs v] of (-8)) // = 8 , abs means "absolute value", it gives the distance of the number from zero.
([floor v] of (5.7)) // = 5 , floor is a function which rounds all numbers DOWN
([ceiling v] of (1.1)) // = 2 , ceiling does the opposite of floor, rounds everything UP
([sqrt v] of (9)) // = 3 , gives you the numbers square root √number
([sin v] of (90)) // = 1 , sin(angle) gives the ratio between the lengths of the side opposite the angle and the hypoteneuse in a right-angled triangle
([cos v] of (90)) // = 0 , cos(angle) gives the ratio between the lengths of the side adjacent to the angle and the hypoteneuse in a right-angled triangle
([tan v] of (45)) // = 1 , tan(angle) gives the ratio between the lengths of the side adjacent to the angle and the opposite side in a right-angled triangle
([asin v] of (1)) // = 90 , asin(angle), acos(angle), atan(angle) all give the angle required to construct a triangle with a side-length ratio of the input.
([ln v] of (3)) // = 1.09... , ln is the natural logarithm, returns the power e (Euler's number) must be raised to in order to get the number inputted.
([log v] of (1000)) // = 3 , like the natural logarithm, but with 10 as the base. Returns the power of 10 of the input, 10^3 = 1000, 10^5=100000, etc.
([10 ^ v] of (2)) // = 100 , raises ten to the power of that number
- Discussion Forums
- » Help with Scripts
-
» what are these blocks? complex operator ones