You are here

protected function CtoolsMathExpressionTestCase::rand01 in Chaos Tool Suite (ctools) 7

Returns a random number between 0 and 1.

Return value

float A random number between 0 and 1 inclusive.

1 call to CtoolsMathExpressionTestCase::rand01()
CtoolsMathExpressionTestCase::testBuildInFunctions in tests/math_expression.test
Test various built-in transcendental and extended functions.

File

tests/math_expression.test, line 52

Class

CtoolsMathExpressionTestCase
Tests the MathExpression library of ctools.

Code

protected function rand01() {
  return mt_rand(0, PHP_INT_MAX) / PHP_INT_MAX;
}