• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i get the farition

 
Prashanth Vijayai
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My secenario is that i want to roundoff a number that comes after a calulation.

var x=(40000/10340000)*100;
which gives me x=0.3868471.

Now im using round(x); where im getting the answer as 0.39

My requirement is that it should not round off , It should come as 0.38 , Is their any function that could be helpfull for me.


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What on earth is a "farition"?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is floor, ceil, toFixed

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic