rect: fix bug in rect; add doc; rename method.
Merge pull request #81 from andelf/andelf-refactor-rect

rect: fix bug in rect; add doc; rename method.