Anonymous user
Fractal tree: Difference between revisions
→{{header|Ruby}}
(Go solution) |
|||
Line 866:
def drawTree(x1, y1, angle, depth)
if
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.
|