Create instance of Digit
The character that needs to represented as a collection of segments
The character that needs to represented as a collection of segments
Returns the array of segments for the character passed to the constructor
Creates a single segment for the segment array that represents the provided character
The number (position) of the segment in question
Returns true if the character is a separator (comma or decimal point)
Returns true if for the provided character the segment should be displayed (false if not)
The number (position) of the segment
Generated using TypeDoc
The Digit Class Represents the segments for one digit.
import { Digit } from '@maximva/examenopdracht-maximva' const digit: Digit = new Digit("1") console.log(digit.segments) // [ // Segment { segmentNumber: 0, turnedOn: false }, // Segment { segmentNumber: 1, turnedOn: false }, // Segment { segmentNumber: 2, turnedOn: true }, // Segment { segmentNumber: 3, turnedOn: true }, // Segment { segmentNumber: 4, turnedOn: false }, // Segment { segmentNumber: 5, turnedOn: false }, // Segment { segmentNumber: 6, turnedOn: false }, // Segment { segmentNumber: 7, turnedOn: false } // ]