
Vector3d.Length casts result to float
Posted Wednesday, 3 February, 2010 - 04:02 by Anonymous| Project: | The Open Toolkit library |
| Version: | 1.0-beta-3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The implementation of Vector3d.Length looks like this:
return (float)System.Math.Sqrt(X * X + Y * Y + Z * Z);
Notice the cast to float, which shouldn't be there.


Comments
#1
Notice the cast to float, which shouldn't be there.
Why should it be omitted? It's actually required since the return type is float.
#2
He's right, the return type for Vector3d.Length is double and the cast is a mistake. Will fix.
#3
Thanks for the bug report, fixed in r2585.
#4
Closing issues fixed in opentk-1.0-beta-3.