Fix randomBool and game of life (#1008)
This commit is contained in:
committed by
GitHub
parent
2f45300f8c
commit
8c1b9b72b2
@ -12,7 +12,6 @@ namespace Math {
|
||||
//% blockId=logic_random block="pick random true or false"
|
||||
//% help=math/random-boolean weight=0
|
||||
export function randomBoolean(): boolean {
|
||||
const v = Math.randomRange(0, 1) * 2;
|
||||
return 1 == Math.floor(v);
|
||||
return Math.randomRange(0, 1) === 1;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user