MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / uniform

Method uniform

tools/python-3.11.9-amd64/Lib/random.py:520–522  ·  view source on GitHub ↗

Get a random number in the range [a, b) or [a, b] depending on rounding.

(self, a, b)

Source from the content-addressed store, hash-verified

518 ## -------------------- real-valued distributions -------------------
519
520 def uniform(self, a, b):
521 "Get a random number in the range [a, b) or [a, b] depending on rounding."
522 return a + (b - a) * self.random()
523
524 def triangular(self, low=0.0, high=1.0, mode=None):
525 """Triangular distribution.

Callers 2

__call__Method · 0.80
__call__Method · 0.80

Calls 1

randomMethod · 0.80

Tested by

no test coverage detected