Skip to content

Commit

Permalink
Arregla bug en la clase ArregloCíclico
Browse files Browse the repository at this point in the history
  • Loading branch information
karv committed Jan 10, 2015
1 parent fda4784 commit 1e15aa5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Serpentina/ArregloCíclico.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;

Expand Down Expand Up @@ -86,6 +86,8 @@ public T this[int i]
{
get {
int j = (i + _Pos) % MaxTamaño;
if (j < 0)
j += MaxTamaño; // Tomar el menor residuo positivo. TODO: ¿No hay una func que lo haga en un sólo paso?
return _Data [j];
}
set {
Expand Down

0 comments on commit 1e15aa5

Please sign in to comment.