Landscape.increaseResolution C# (CSharp) Method

increaseResolution() private static method

private static increaseResolution ( this xs, int nr ) : IEnumerable
xs this
nr int
return IEnumerable
    private static IEnumerable<int> increaseResolution(this IEnumerable<int> xs, int nr)
    {
        bool first = true;
        int prev = 0;

        foreach (int x in xs.Select(y => y * 100))
        {
          if (!first)
          {
        int diff = (x - prev) / nr;

        for (int i = 0; i < nr; i++)
          yield return (prev + (diff * i)) / 100;
          }

          prev = x;
          first = false;
        }
    }