From: Jens <je...@fa...> - 2005-03-18 17:01:11
|
Due to the fact that I needed the missing standard xquery function round-half-to-even to round values to a given precision, I have tried to implement it on my own. It is my first contribution to the eXist-project, hopefully I have done everything in an accurate way. If not, feel free to correct me... ;-) Anyway, in order to get the function running, I have chosen to add a round(IntegerValue precision)-method to the class NumericValue and its implementing classes DecimalValue, DoubleValue, FloatValue and IntegerValue. Of course, the attached patch includes the new function module called FunRoundHalfToEven. I have also added a new test case called XQueryFunctionsTest, which tests the new xquery function with some tricky values (mainly the examples from W3C). Maybe it would be wise to have tests in there for other xquery functions as well (I have not found many so far)? Jens |