You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tim O'Brien <to...@discursive.com> on 2003/08/03 05:17:25 UTC
[lang] ArrayUtils.contains()
Has anyone thought of adding a tolerance to ArrayUtils when trying to calls
contains, indexOf, of lastIndexOf for a floating point number?
boolean ArrayUtils.contains(double[] array, double valueToFind, double tolerance)
The method would return true if array contained a double value in valueToFind +/- tolerance.
Any thoughts?
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] ArrayUtils.contains()
Posted by Stephen Colebourne <sc...@btopenworld.com>.
Hadn't thought of that one, but I guess it makes sense. If you want to
supply a patch....;-)
Stephen
----- Original Message -----
From: "Tim O'Brien" <to...@discursive.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Sunday, August 03, 2003 4:17 AM
Subject: [lang] ArrayUtils.contains()
> Has anyone thought of adding a tolerance to ArrayUtils when trying to
calls
> contains, indexOf, of lastIndexOf for a floating point number?
>
> boolean ArrayUtils.contains(double[] array, double valueToFind, double
tolerance)
>
> The method would return true if array contained a double value in
valueToFind +/- tolerance.
>
> Any thoughts?
>
> Tim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
Re: [lang] ArrayUtils.contains()
Posted by Stephen Colebourne <sc...@btopenworld.com>.
Hadn't thought of that one, but I guess it makes sense. If you want to
supply a patch....;-)
Stephen
----- Original Message -----
From: "Tim O'Brien" <to...@discursive.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Sunday, August 03, 2003 4:17 AM
Subject: [lang] ArrayUtils.contains()
> Has anyone thought of adding a tolerance to ArrayUtils when trying to
calls
> contains, indexOf, of lastIndexOf for a floating point number?
>
> boolean ArrayUtils.contains(double[] array, double valueToFind, double
tolerance)
>
> The method would return true if array contained a double value in
valueToFind +/- tolerance.
>
> Any thoughts?
>
> Tim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org