code: public static IntInterval oddsFromTo(int from, int to)
      {
          if (from % 2 == 0)
          {
              if (from < to)
              {
                  from++;
              }
              else
              {
                  from--;
              }
          }
          if (to % 2 == 0)
          {
              if (to > from)
              {
                  to--;
              }
              else
              {
                  to++;
              }
          }
          return IntInterval.fromToBy(from, to, to > from ? 2 : -2);
      }
docs: Returns an IntInterval representing the odd values from the value from to the value to.