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

2 comments:

Al Hart said...

I'm trying to comment on the code.

what should I be looking for?

The slightly different color of x,y on line6?

Jim Foltz said...

Al, thanks for the commment. Color syntax highlighting is what I wanted. Blogger is a difficult platform to work with and it's been a struggle to organize everything I want to put on this blog.

Popular Posts (Last 30 Days)