Exemple #1
0
 public NumberSystem(NumberAlphabet numberAlphabet, FirstSymbolType firstSymbolType, bool firstSymbolCollapses, string description = default(string))
 {
     NumberAlphabet       = numberAlphabet;
     FirstSymbolType      = firstSymbolType;
     FirstSymbolCollapses = firstSymbolCollapses;
     Description          = description;
 }
Exemple #2
0
    public int ToOrdinal(char value)
    {
        var ordinal = NumberAlphabet.ToOrdinal(value);

        return(FirstSymbolType == FirstSymbolType.Zero
            ? ordinal
            : ordinal + 1);
    }
Exemple #3
0
 public NumberSystem(NumberAlphabet numberAlphabet, string description)
 {
     NumberAlphabet = numberAlphabet;
     Description    = description;
 }