We have moved at community.getvera.com

Author Topic: Can I extract data from a website to use in PLEG (as a variable)  (Read 11145 times)

Offline dmckenna

  • Full Member
  • ***
  • Posts: 196
  • Karma: +8/-2
Re: Can I extract data from a website to use in PLEG (as a variable)
« Reply #60 on: April 23, 2015, 09:28:43 am »
X % 1 gives the remainder of dividing X by 1 - so the fractional part. X - (X % 1) is therefore the integer part of X. You can use it for rounding if you add 0.5: (X + 0.5) - ((X + 0.5) % 1).

You can also use it with a decimal modulus so you could get your two decimal places using:

(X + 0.005) - ((X + 0.005) % 0.01)

Thanks Rex - you're the best.......