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

Rename Time::<Fixed>::overstep_percentage() and Time::<Fixed>::overstep_percentage_f64() #10448

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Rename Time::<Fixed>::overstep_percentage() and Time::<Fixed>::overstep_percentage_f64() #10448

merged 2 commits into from
Nov 13, 2023

Conversation

mamekoro
Copy link
Contributor

@mamekoro mamekoro commented Nov 8, 2023

Objective

This is similar to #10439.

Time::<Fixed>::overstep_percentage() and Time::<Fixed>::overstep_percentage_f64() returns values from 0.0 to 1.0, but their names use the word "percentage". These function names make it easy to misunderstand that they return values from 0.0 to 100.0.

To avoid confusion, these functions should be renamed to "overstep_fraction(_f64)".

Solution

Rename them.


Changelog

Changed

  • Renamed Time::<Fixed>::overstep_percentage() to Time::<Fixed>::overstep_fraction()
  • Renamed Time::<Fixed>::overstep_percentage_f64() to Time::<Fixed>::overstep_fraction_f64()

Migration Guide

  • Time::<Fixed>::overstep_percentage() has been renamed to Time::<Fixed>::overstep_fraction()
  • Time::<Fixed>::overstep_percentage_f64() has been renamed to Time::<Fixed>::overstep_fraction_f64()

@alice-i-cecile alice-i-cecile added C-Usability A simple quality-of-life change that makes Bevy easier to use C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide A-Time Involves time keeping and reporting labels Nov 8, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 13, 2023
@alice-i-cecile
Copy link
Member

Merging with #10442.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 13, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 13, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 13, 2023
Merged via the queue into bevyengine:main with commit 54b7cab Nov 13, 2023
26 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
…rstep_percentage_f64()` (bevyengine#10448)

# Objective
This is similar to bevyengine#10439.

`Time::<Fixed>::overstep_percentage()` and
`Time::<Fixed>::overstep_percentage_f64()` returns values from 0.0 to
1.0, but their names use the word "percentage". These function names
make it easy to misunderstand that they return values from 0.0 to 100.0.

To avoid confusion, these functions should be renamed to
"`overstep_fraction(_f64)`".

## Solution
Rename them.

---

## Changelog

### Changed
- Renamed `Time::<Fixed>::overstep_percentage()` to
`Time::<Fixed>::overstep_fraction()`
- Renamed `Time::<Fixed>::overstep_percentage_f64()` to
`Time::<Fixed>::overstep_fraction_f64()`

## Migration Guide
- `Time::<Fixed>::overstep_percentage()` has been renamed to
`Time::<Fixed>::overstep_fraction()`
- `Time::<Fixed>::overstep_percentage_f64()` has been renamed to
`Time::<Fixed>::overstep_fraction_f64()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Time Involves time keeping and reporting C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants