Rename a length's abs component to px
`dp` is coming, and then `abs` says which of the two it is not. The component has always been a pixel count, so the name that admits it is the one that leaves room for a second unit beside it. Mechanical: the field on `Len` and `UiScalar`, their constructors, `to_abs`/`get_abs`, the matching WGSL struct member and the locals composing it. Field order and types are unchanged, so the `Pod` layout the shader reads is the same bytes. `f32::abs` is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f7cd8251b
commit
7c50a3e51b
22 files changed
+120
-124
No files matched your search
+2
-2
@@ -46,8 +46,8 @@ fn plant(h: &mut Harness, seed: u64, edits: &Edits) -> Tree {
|
||||
|
||||
fn resize_one(h: &mut Harness, tree: &Tree, idx: usize, rng: &mut Rng) -> Lens {
|
||||
let lens = [
|
||||
Some(Len::abs(20.0 + rng.below(180) as f32)),
|
||||
Some(Len::abs(20.0 + rng.below(180) as f32)),
|
||||
Some(Len::px(20.0 + rng.below(180) as f32)),
|
||||
Some(Len::px(20.0 + rng.below(180) as f32)),
|
||||
];
|
||||
let sized = &mut h.rsc[tree.sized[idx]];
|
||||
sized.x = lens[0];
|
||||
|
||||
Reference in new issue
Block a user