Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Val::ZERO Constant #9566

Merged
merged 4 commits into from
Aug 26, 2023
Merged

Commits on Aug 25, 2023

  1. Added Val::ZERO Constant

    * Added `Val::ZERO` as a constant which is defined as `Val::Px(0.)`.
    * Added manual `PartialEq` implementation for `Val` which allows any zero value to equal any other zero value. E.g., `Val::Px(0.) == Val::Percent(0.)` etc.
    * Replaced instances of `Val::Px(0.)`, `Val::Percent(0.)`, etc. with `Val::ZERO`
    * Fixed `bevy_ui::layout::convert::tests::test_convert_from` test to account for Taffy not equating `Points(0.)` and `Percent(0.)`. These tests now use `assert_eq!(...)` instead of `assert!(matches!(...))` which gives easier to diagnose error messages.
    bushrat011899 committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    ba329b2 View commit details
    Browse the repository at this point in the history
  2. Added UiRect::ZERO

    bushrat011899 committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    900aefe View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. Configuration menu
    Copy the full SHA
    a50de4a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6c67796 View commit details
    Browse the repository at this point in the history