Commit graph

260 commits

Author SHA1 Message Date
Rémi Verschelde
2017590ef6
AABB: Improve docs and test for has_point
Contrarily to the 2D Rect2i counterpart, it doesn't make much sense in 3D
and for floating-point AABBs to exclude points on some of its faces.
2021-12-02 15:45:55 +01:00
Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Rémi Verschelde
b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect 2021-11-24 16:34:01 +01:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
kleonc
91595b16e3 Add Image::fill_rect method 2021-11-23 18:06:23 +01:00
Paulb23
eb9100f085 Fix divide by zero in pck_packer 2021-11-17 18:07:29 +00:00
Rémi Verschelde
36c4451a7b
Rect2: Clarify docs for has_point excluding bottom and right borders
Improve tests, as well as documentation for `expand`.
2021-11-11 22:51:29 +01:00
Rémi Verschelde
2beaae4b6f
String: Remove erase method, bindings can't mutate String 2021-11-11 11:23:32 +01:00
Aaron Franke
99a282f631
Move and organize tests into subfolders 2021-11-07 00:43:31 -06:00