Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. If the value < 0.0:
  2. Insert - into string
  3. Subtract value from 0.0 to make it positive.
  4. While the value <= 10.0:
  5. Divide by 10
  6. Increment decimal counter
  7. For each digit of required precision:
  8. Take the integer portion of the value and place it in the string
  9. Decrement decimal counter
  10. If decimal counter is 0:
  11. Insert decimal point
  12. Multiply the value by 10.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement