Showing posts with label test. Show all posts
Showing posts with label test. Show all posts

Ruby Code Syntax Highlighting Test

This is a snippet of SketchUp Ruby code. How does it look?

a = 10.0.feet
b = 250.0.feet
pts = []
0.step(b, 1.feet) do |x|
y = a * Math::sin( (x / b) * 2 * Math::PI)
#p x, y
pts << [x, y]
end
Sketchup.active_model.active_entities.add_edges pts

Popular Posts (Last 30 Days)