Git Product home page Git Product logo

test4's Introduction

Smart Tools for micro:bit

Smart Tools pxt extension for micro:bit

Alt text

Basic Usage

let x = 0
x = 123.52
basic.showString(smarttools.intToString(
123.1
))
basic.showNumber(smarttools.stringToInt(
"12.3"
))
basic.showNumber(smarttools.round(
12.5
))
basic.showNumber(smarttools.roundUp2PositiveInfinity(
12.5
))
basic.showNumber(smarttools.roundDown2NegativeInfinity(
12.5
))
basic.showNumber(smarttools.round2Zero(
12.5
))
basic.forever(function () {
	
})

Use ||intToString|| to convert int to string (removing fractions).

Use ||stringToInt|| to convert string to int (removing fractions).

Use ||round|| to convert decimal to int with round.

Use ||roundUp2PositiveInfinity|| to convert decimal to int with round up to positive infinity.

Use ||roundDown2NegativeInfinity|| to convert decimal to int with round down to negative infinity.

Use ||round2Zero|| to convert decimal to int with round to zero.

Use ||hex2Dec|| to convert hex to decimal with round to zero.

Use ||dec2Hex|| to convert decimal to hex with round to zero.

Demo

Alt text

Supported targets

  • for PXT/microbit

License

MIT

test4's People

Contributors

xuefengedu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.