I’m trying to truncate a decimal part.
I mean create a function which do this.
1/9 ~ 0.11111111111111
So, if in the function set that wants to pick 5 decimals, must returns 0.11111
I was doing this using strings, but I guess is not a good idea. Is possible do that using math operations?
You can use
http://msdn.microsoft.com/en-us/library/7d101hyf.aspx
Edit: My version of a suitable method (though Gary has already shared one below)