protected function _rand_amplitude($a) { return mt_rand((1 - $a) * 10000, (1 + $a) * 10000) / 10000; }