Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the round filter #1255

Merged
merged 1 commit into from
Nov 23, 2013
Merged

added the round filter #1255

merged 1 commit into from
Nov 23, 2013

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Oct 31, 2013

fixes #1238

return round($value, $precision);
}

return $method($value * pow(10, $precision)) / pow(10, $precision);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we validate the value of $method, before calling it ?

@tobiassjosten
Copy link

Definitely a nice addition to the filters! Though I'd much rather also add a ceil and floor filter, instead of using the keyword string to direct this.

@@ -1,5 +1,6 @@
* 1.15.0 (2013-XX-XX)

* added the round filter
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong version. In the documentation is mentioned 1.14.3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

fabpot added a commit that referenced this pull request Nov 23, 2013
This PR was merged into the master branch.

Discussion
----------

added the round filter

fixes #1238

Commits
-------

ff4a7d2 added the round filter
@fabpot fabpot merged commit ff4a7d2 into master Nov 23, 2013
@fabpot fabpot deleted the round branch April 27, 2014 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants