diff options
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r-- | OpenSim/Tests/Common/DoubleToleranceConstraint.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/VectorToleranceConstraint.cs | 11 |
2 files changed, 5 insertions, 10 deletions
diff --git a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs index 3363c54..a766549 100644 --- a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs +++ b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs | |||
@@ -53,14 +53,14 @@ namespace OpenSim.Tests.Common | |||
53 | { | 53 | { |
54 | throw new ArgumentException("Constraint cannot be used upon null values."); | 54 | throw new ArgumentException("Constraint cannot be used upon null values."); |
55 | } | 55 | } |
56 | if( valueToBeTested.GetType() != typeof(double)) | 56 | if (valueToBeTested.GetType() != typeof(double)) |
57 | { | 57 | { |
58 | throw new ArgumentException("Constraint cannot be used upon non double-values."); | 58 | throw new ArgumentException("Constraint cannot be used upon non double-values."); |
59 | } | 59 | } |
60 | 60 | ||
61 | _valueToBeTested = (double)valueToBeTested; | 61 | _valueToBeTested = (double)valueToBeTested; |
62 | 62 | ||
63 | return IsWithinDoubleConstraint(_valueToBeTested, _baseValue ); | 63 | return IsWithinDoubleConstraint(_valueToBeTested, _baseValue); |
64 | } | 64 | } |
65 | 65 | ||
66 | public override void WriteDescriptionTo(MessageWriter writer) | 66 | public override void WriteDescriptionTo(MessageWriter writer) |
diff --git a/OpenSim/Tests/Common/VectorToleranceConstraint.cs b/OpenSim/Tests/Common/VectorToleranceConstraint.cs index cc96615..2b60db3 100644 --- a/OpenSim/Tests/Common/VectorToleranceConstraint.cs +++ b/OpenSim/Tests/Common/VectorToleranceConstraint.cs | |||
@@ -61,14 +61,9 @@ namespace OpenSim.Tests.Common | |||
61 | 61 | ||
62 | _valueToBeTested = (LLVector3) valueToBeTested; | 62 | _valueToBeTested = (LLVector3) valueToBeTested; |
63 | 63 | ||
64 | if ( IsWithinDoubleConstraint(_valueToBeTested.X,_baseValue.X) && | 64 | return (IsWithinDoubleConstraint(_valueToBeTested.X, _baseValue.X) && |
65 | IsWithinDoubleConstraint(_valueToBeTested.Y,_baseValue.Y) && | 65 | IsWithinDoubleConstraint(_valueToBeTested.Y, _baseValue.Y) && |
66 | IsWithinDoubleConstraint(_valueToBeTested.Z,_baseValue.Z) ) | 66 | IsWithinDoubleConstraint(_valueToBeTested.Z, _baseValue.Z)); |
67 | { | ||
68 | return true; | ||
69 | } | ||
70 | |||
71 | return false; | ||
72 | } | 67 | } |
73 | 68 | ||
74 | public override void WriteDescriptionTo(MessageWriter writer) | 69 | public override void WriteDescriptionTo(MessageWriter writer) |