Get point at 30 degrees
-
I want to calculate a line at 30 degrees.
for example one line is 36" where would the line be 90 degrees from there at 30 degrees.
excel formula is
=TAN(RADIANS(30))*36
which will give me
20.7846096908265Thanks for looking.
-
Math.tan(30.degrees)*36
-
The trig functions are available in the Ruby Math module, e.g. Math.tan(), and SketchUp's extended Numeric class knows how to convert between radians and degrees, so just rewrite your excel expression as SketchUp Ruby:
side = Math.tan(30.degrees)*36.0
Note: SketchUp's radians and degrees functions name the source dimension and convert to the other, so 30.degrees means the value 30 is in degrees and you want radians.
[sdmitch beat me to it!]
Advertisement