REFACTOR make method more readable

release
Johannes Deml 2017-08-02 11:59:27 +02:00
parent c8de1b9289
commit 14f42df81c
2 changed files with 3 additions and 3 deletions

View File

@ -250,6 +250,6 @@ namespace UnityEngine.UI.Extensions
} }
} }
} }
#endregion #endregion
} }
} }

View File

@ -314,8 +314,8 @@ namespace UnityEngine.UI.Extensions
internal int GetPageforPosition(Vector3 pos) internal int GetPageforPosition(Vector3 pos)
{ {
return _isVertical ? return _isVertical ?
-(int)Math.Round((pos.y - _scrollStartPosition) / _childSize) : (int)Math.Round((_scrollStartPosition - pos.y) / _childSize) :
-(int)Math.Round((pos.x - _scrollStartPosition) / _childSize); (int)Math.Round((_scrollStartPosition - pos.x) / _childSize);
} }
/// <summary> /// <summary>