Soldato
i've got a double that i need to round (in any direction) to an integer and then convert to an int so that i can use it as the value of an array.
i.e. i want to be able to go myarray[mydouble][x]
i've tried using the convert to int32 function but this is giving me an out of bounds error when it really shouldnt, so i guess this just takes the binary double and crosses out double and writes int, resulting in a massive number that is way out of bounds.
if anyone could explain what i need to do that would be great, because its the last little thing i need to do before the big project gets handed in on friday
thanks
ps. we have never been taught C#, and we have only been taught the very basics of C++, so if you could explain things in morons terms then that would be great
i.e. i want to be able to go myarray[mydouble][x]
i've tried using the convert to int32 function but this is giving me an out of bounds error when it really shouldnt, so i guess this just takes the binary double and crosses out double and writes int, resulting in a massive number that is way out of bounds.
if anyone could explain what i need to do that would be great, because its the last little thing i need to do before the big project gets handed in on friday
thanks
ps. we have never been taught C#, and we have only been taught the very basics of C++, so if you could explain things in morons terms then that would be great