Added triangle with jslinted, and nodeunit tested centroid function.