The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I round floats up?
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#1
How do I round floats up?

AngelScript seems to need a math addon to do ceil() and floor(), so all I can do is to bash the float into an int.

More specifically, I find it impossible to have GetPlayerSanity() return values such as "90" or "50". Instead I get "89" and "49". Can I do anything about this (without simply adding 1 to the value)?

Noob scripting tutorial: From Noob to Pro

05-25-2012, 05:21 PM
Find


Messages In This Thread
How do I round floats up? - by Cranky Old Man - 05-25-2012, 05:21 PM
RE: How do I round floats up? - by Your Computer - 05-25-2012, 06:29 PM
RE: How do I round floats up? - by Cranky Old Man - 05-25-2012, 07:12 PM
RE: How do I round floats up? - by Apjjm - 05-25-2012, 07:29 PM
RE: How do I round floats up? - by Cranky Old Man - 05-25-2012, 07:43 PM



Users browsing this thread: 1 Guest(s)