tweak to helpers
This commit is contained in:
parent
4078d41097
commit
c9b269e2ce
@ -12,6 +12,7 @@ namespace Math {
|
||||
//% blockId=logic_random block="pick random true or false"
|
||||
//% help=math/random-boolean weight=0
|
||||
export function randomBoolean(): boolean {
|
||||
return Math.floor(Math.randomRange(0, 1) * 2) == 1;
|
||||
const v = Math.randomRange(0, 1) * 2;
|
||||
return 1 == Math.floor(v);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user