MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / positive

Function positive

agents/tools/misc.py:157–163  ·  view source on GitHub ↗

Return the given number if positive, else 0 :param num: value to check

(num)

Source from the content-addressed store, hash-verified

155
156
157def positive(num):
158 """
159 Return the given number if positive, else 0
160
161 :param num: value to check
162 """
163 return num if num > 0.0 else 0.0

Callers 1

car_following_managerMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected