mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
small changes
This commit is contained in:
parent
ff153c1db5
commit
6b9fdc0ffe
7 changed files with 177 additions and 67 deletions
|
|
@ -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 = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue