Search

Thursday, July 30, 2020

Making Scratch Projects :: Help With Scripts :: Help with the (() of ()) block

Waseypup :

-ShadowOfTheFuture- wrote:

floor: rounds the number down to the nearest integer less than it

ceiling: rounds the number up to the nearest integer greater than it

sqrt: square root of a number

sin, cos, tan: they're what's called trigonometric functions, which are basically functions that have to do with right triangles. If you have the angle measurement of an acute angle in a right triangle, sine (sin) gives you the length of the side opposite the angle divided by the length of the hypotenuse of the triangle, cosine (cos) gives you the length of the side adjacent to the angle divided by the length of the hypotenuse, and tangent (tan) gives you the length of the opposite side divided by the length of the adjacent side. It's a bit hard to explain without some mathematical background, but this wiki article might explain it a bit more clearly.

asin, acos, atan: the inverse trigonometric functions, you can think of these as the “opposites” of sin, cos, and tan. Taking the arcsine (asin) of the ratio between the lengths of the side opposite the acute angle and the hypotenuse will give you the measurement of the angle. Again, a bit hard to explain without some mathematical background.

10^: gives you 10 raised to the power of a number. For example, 10^2 = 100

e^: gives you the mathematical constant e (roughly 2.718281828…) raised to the power of a number

log: log base 10 is pretty much the inverse of “10^”, taking a number and gives you the power to which you would need to raise 10 to get the original number. For example, log(100) = 2

ln: the natural logarithm, similar to log except with e instead of 10. For example, log(e^2) = 2
THX Alot

from Latest posts on Help With Scripts https://ift.tt/2Ey3LdX

No comments:

Post a Comment