internal static void DoZoom(float zoomFactor, TimelineWindow.TimelineState state, float focalTime, float pixel) { zoomFactor = Mathf.Clamp(zoomFactor, -50f, 50f); float num = Mathf.Max(0.01f, 1f + zoomFactor * 0.01f); Vector2 timeAreaTranslation = state.timeAreaTranslation; Vector2 timeAreaScale = state.timeAreaScale; timeAreaScale.x = state.timeAreaScale.x * num; timeAreaTranslation.x = pixel - focalTime * timeAreaScale.x - state.timeAreaRect.get_x(); if (Mathf.Abs(timeAreaTranslation.x - 10f) < 1.401298E-45f) { timeAreaTranslation.x = 10f; } state.SetTimeAreaTransform(timeAreaTranslation, timeAreaScale); }