|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> If you declare a function taking a float and an unsigned int parameter in
> C#, you can't just call it as
> xyz(0.3, 12)
> You have to actually say
> xyz(0.3f, 12u)
> because doubles don't silently cast to floats and ints don't silently cast
> to unsigned ints. Even tho these are literals the compiler can see cast
> without losing precision. Feh.
12 yes, but are you sure 0.3 can be converted from double to float without
losing precision? (Not that it really matters with literals, though...)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |