1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Show the innermost debug rectangle when pressing all modifier keys (#4782)

This is usually what the user is interested in.
This commit is contained in:
Emil Ernerfeldt
2024-07-05 08:36:56 +02:00
committed by GitHub
parent ad597a8491
commit 143119943d
8 changed files with 135 additions and 98 deletions

View File

@@ -713,7 +713,7 @@ fn quadratic_for_each_local_extremum<F: FnMut(f32)>(p0: f32, p1: f32, p2: f32, c
fn cubic_for_each_local_extremum<F: FnMut(f32)>(p0: f32, p1: f32, p2: f32, p3: f32, cb: &mut F) {
// See www.faculty.idc.ac.il/arik/quality/appendixa.html for an explanation
// A cubic Bézier curve can be derivated by the following equation:
// A cubic Bézier curve can be derived by the following equation:
// B'(t) = 3(1-t)^2(p1-p0) + 6(1-t)t(p2-p1) + 3t^2(p3-p2) or
// f(x) = a * x² + b * x + c
let a = 3.0 * (p3 + 3.0 * (p1 - p2) - p0);