R
ReneMarxis
Hello
can someone explain me?
can someone explain me?
ReneMarxis said:can someone explain me?
False
Hi Rene,
Doubles are a non precision floating point number. For precision work with
decimal values use the Decimal type.
If working with Double (or Single) then consider using Round, Ceiling, Floor
etc to. To compare Double values you typically look for a value less than a
margin of error, e.g:
<Runtime.CompilerServices.Extension()> _
Function Approximates(ByVal left As Double, ByVal right As Double,
Optional ByVal maxDifference As Double = 0.000000001) As Boolean
Return Math.Abs(left - right) < maxDifference
End Function
- Zitierten Text anzeigen -