Fractal tree: Difference between revisions

(Go solution)
Line 866:
def drawTree(x1, y1, angle, depth)
if !(depth =!= 0)
x2 = x1 + (Math.cos(angle * @deg_to_rad) * depth * 10.0).to_i
y2 = y1 + (Math.sin(angle * @deg_to_rad) * depth * 10.0).to_i
Line 880:
end
</lang>
 
=={{header|Scala}}==
Adapted from the Java version. Screenshot below.
Anonymous user