Skip to content

Conversation

@nykolaslima
Copy link

Renamed precision to scale, that represents the number of digits to the right of decimal point.

Added support to precision that represents the total number of digits.

eg:
$(".field").numeric({ precision: 4, scale: 2 }); //99.99

@nykolaslima
Copy link
Author

@johnedmonds hey john, you can merge it to your branch and then update your pullrequest to Sam's repository.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add braces?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I already did, take a look...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the terms "scale" and "precision" to be fairly confusing. Can we rename them like
"precision" -> "digits"
"scale" -> "fractionalDigits"

(FYI you might find this question interesting: http://math.stackexchange.com/questions/64042/what-are-the-numbers-before-and-after-the-decimal-point-referred-to-in-mathemati)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnedmonds
Copy link
Owner

Sorry for taking so long to review this. It looks great now! Nice job!

johnedmonds added a commit that referenced this pull request Apr 11, 2013
precision and scale suppport
@johnedmonds johnedmonds merged commit 3a55376 into johnedmonds:master Apr 11, 2013
@nykolaslima
Copy link
Author

No problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants