pxt-calliope/libs/core/helpers.ts
Peli de Halleux 0a708ef815
BLE HF2 log service (#1549)
* basic hf2 service

* service to send hf2 log messages

* use common console.log

* updated shims

* adding config

* adding simulator

* fix hf2 logging

* hide console blocks
2018-10-29 21:12:09 -07:00

10 lines
317 B
TypeScript

namespace Math {
/**
* Generates a `true` or `false` value randomly, just like flipping a coin.
*/
//% blockId=logic_random block="pick random true or false"
//% help=math/random-boolean weight=0
export function randomBoolean(): boolean {
return Math.randomRange(0, 1) === 1;
}
}