This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Extracting values from a double  RSS feed

Sri Ram
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a double number d = 15.33 .I want to do the below calculation.(ie) i want to seperate the whole number and the decimal part without using a splitter based on (.) to gets the values.How can I do that??

e.g. 15.33 convert to 1520

Take decimal portion * 60 rounded. (0.33*60=20)

is what i want to perform? Please help.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!