SectorRange.toString

Gives an representation of the angle span

struct SectorRange
const pure
string
toString
()

Return Value

Type: string

text of angle span

Examples

enum full_dart_sectors_count = ushort.max + 1;
{ //SectorRange: full sector iterator
    auto sector_range = SectorRange(0, 0);
    auto iteration = 0;
    foreach (sector; sector_range) {
        iteration++;

        if (iteration > full_dart_sectors_count)
            assert(0, "Range overflow");
    }
    assert(iteration == full_dart_sectors_count);
}
{ //SectorRange: full sector iterator
    auto sector_range = SectorRange(5, 5);
    auto iteration = 0;
    foreach (sector; sector_range) {
        iteration++;

        if (iteration > full_dart_sectors_count)
            assert(0, "Range overflow");
    }
    assert(iteration == full_dart_sectors_count);
}
{ //SectorRange:
    auto sector_range = SectorRange(1, 10);
    auto iteration = 0;
    foreach (sector; sector_range) {
        iteration++;

        if (iteration > 9)
            assert(0, "Range overflow");
    }
    assert(iteration == 9);
}