Issue #691 resolved

love.physics method naming

hahawoo avatarhahawoo created an issue

ChainShape:setPrevVertex isn't so easy to say vocally or subvocally, how about ChainShape:setPreviousVertex?

Because of grammar, returning a single boolean, and consistency with Body:

World:setAllowSleeping -> setSleepingAllowed
World:getAllowSleeping -> isSleepingAllowed

Joint:getCollideConnected also returns a single boolean... I'm not sure what it should be named though.

For setter/getter symmetry and API consistency (via not starting a method with "enable"):

Prismatic/RevoluteJoint:enableLimit -> setLimitsEnabled
RevoluteJoint:isLimitsEnabled -> hasLimitsEnabled
PrismaticJoint:isLimitEnabled -> hasLimitsEnabled
Prismatic/RevoluteJoint:enableMotor -> setMotorEnabled

Is there are reason why Shape:computeAABB and computeMass aren't named getAABB and getMass? Perhaps it's good that it communicates that it doesn't simply return state, but does a computation based on the state and information given as arguments, but it seems inconsistent with Font:getWidth and Font:getWrap, which seem analogous. Edit: I'm not necessarily suggesting these get* names, just thinking out loud, hehe.

Comments (4)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.