Skip to content

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Oct 7, 2022

This PR uses float calculations in Color and is also a continuation of #66962.

  • Color:
    • Use float literals for float calculations and most other places using floats.
    • Only one of these changes actually changes behavior: the floats in srgb_to_linear
  • Replace #include "core/string/print_string.h" with #include "core/string/ustring.h" where relevant, and in a few places remove #include "core/string/print_string.h" where it's not needed.
  • In Projection::get_endpoints, put the planes we're using on their own lines. This is for consistency with godot-cpp since there it's a Variant array so we need Plane casts, but the constructor-style cast doesn't work in this case and I figured the line was getting long and complicated so I put it on its own line. I think it's more readable anyway.
  • Some comment and whitespace changes.

@aaronfranke aaronfranke force-pushed the color-float-literals branch from 786c0bb to 43722db Compare October 7, 2022 16:29
@akien-mga akien-mga merged commit 39f9c4d into godotengine:master Oct 7, 2022
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the color-float-literals branch October 7, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants