is the temperature you want drawn in 7-segment display. ex: -12.5 The constructor takes the temperature and runs makes it into a String. This string is then looped for every character to make a 7-bit segment. The 2 functions .checkForMinus() and .checkForChar() are also used.
Is the string array you want to loop through
The function then adds the charachters on the correct row.
which string do you want to check for the comma?
This is used for the Comma check. Draws a comma if the class == true.
what string do you want to check?
This is used for drawing a minus sign if the string matches it.
Prints to console. Does a console.log() for every row.
Prints the number into a string that can be returned.
Generated using TypeDoc
A Class created to output the big 7-segment display numbers.
Easy to use:
import DrawBigTemperature from './DrawBigTemperature' const temperature = new Temperature(915.2); temperature.printToConsole(); // Would print the temperature 915.2°C to the console temperature.return(); // Would return the temperature 915.2°C in a string
This would print 915.2 ° C in the console