nature-of-code / noc-book

The Nature of Code book (archived repo, see README for new repo / build system!)

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code comment header?

shiffman opened this issue · comments

This is a bit of a weird one, but in rare instances I have a code comment not associated with a line of code that acts as a header for some comments below. I could simply rewrite the comments to not do this or else perhaps create a class / style (grey box only on right side?) for this. Right now it looks odd:

The "header" is "Our algorithm for calculating acceleration:"

screen shot 2016-07-11 at 11 02 25 am

In order to achieve this I've created an extra class named .comment-header

void update() {

    //{.comment-header} Our algorithm for calculating acceleration:

    //{!2} Find the vector pointing towards the mouse.
    PVector mouse = new PVector(mouseX, mouseY);
    PVector dir = PVector.sub(mouse, position);