Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Math
  5. roundToDP

roundToDP

Platform Compatibility

PC Mac OSX Oculus Quest
X X X

Round to a certain number of decimal places

Parameters:

  • num
    • A float value
  • dp Optional
    • An integer value

returns a Float (decimal number) value

Example:

1
obj.roundToDP(num, dp = 2)
Tags
Was this article helpful to you? Yes No

How can we help?