small changes

This commit is contained in:
kotyaralih 2022-01-09 14:24:44 +00:00
parent ff153c1db5
commit 6b9fdc0ffe
7 changed files with 177 additions and 67 deletions

View file

@ -46,10 +46,18 @@ class Random{
public function nextInt(){
return Utils::readInt($this->nextBytes(4)) & 0x7FFFFFFF;
}
public function nextSignedInt(){
return Utils::readInt($this->nextBytes(4));
}
public function nextFloat(){
return $this->nextInt() / 0x7FFFFFFF;
}
public function nextSignedFloat(){
return $this->nextSignedInt() / 0x7FFFFFFF;
}
public function nextBytes($byteCount){
$bytes = "";