public float WorldYAt(float zPosition, bool orthogonal, float orthogonalHeight, float screenY)
{
float verticalPercentage = (screenY - this.DestinationRectangle.Top) / (float)this.DestinationRectangle.Height;
if (!orthogonal)
{
float absoluteTop = this.AbsoluteTopYEdgeAt(zPosition);
float height = this.RelativeYEdgeAt(zPosition) * 2;
return absoluteTop - height * verticalPercentage;
}
else
{
float yDistanceFromEdge = verticalPercentage * orthogonalHeight;
return (this.Y + orthogonalHeight / 2.0f - yDistanceFromEdge);
}
}