jsjtxietian
6f094856e7
Make get_id_path return empty when first point is disabled
2025-06-16 01:42:13 +02:00
Rémi Verschelde
6eb6e3e6e0
Merge pull request #107457 from akien-mga/improve-error-message-call-single-argument
...
Improve error messages for method calls expecting only 1 argument
2025-06-12 22:49:36 +02:00
Rémi Verschelde
d1083c9722
Improve error messages for method calls expecting only 1 argument
2025-06-12 17:02:59 +02:00
Lukas Tenbrink
b13a0e1834
Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized.
2025-06-11 18:13:02 +02:00
Lukas Tenbrink
ed836df150
Make conversions from math types to String explicit, to avoid accidental conversions.
2025-06-09 01:58:18 +02:00
Zi Ye
b957cf73ef
Optimized and exposed Basis::scaled_local.
2025-06-05 13:06:46 -05:00
retrotails
ae06a2de48
Revert some instances of Math::INF back to 1e20
2025-06-05 09:32:40 -04:00
Rémi Verschelde
61639d9574
Merge pull request #106996 from Ivorforce/no-oa-hashmap
...
Core: Remove `OAHashMap`, in favour of `AHashMap`
2025-06-05 13:12:34 +02:00
Aaron Franke
f6f1df7d73
Add 64-bit versions of core power of 2 functions
2025-06-01 23:11:12 -07:00
Lukas Tenbrink
963c20565b
Remove OAHashMap, in favour of AHashMap.
...
The two types had (mostly) the same decisions, but `AHashMap` is a faster implementation, and is more consistent with `HashMap`.
2025-05-31 15:50:10 +02:00
Lukas Tenbrink
37415530d7
Un-support force_trivial parameter for LocalVector. Instead, users are reformatted to use resize_uninitialized to make it explicit that the resize does not initialize missing elements.
2025-05-27 18:43:36 +02:00
Lukas Tenbrink
ea6fbd6687
Use OkHSV for rainbow labels.
2025-05-22 22:53:32 +02:00
Thaddeus Crews
6c2d288ef1
Merge pull request #106337 from TokageItLab/arc-tolerance
...
Fix Quaternion arc constructor tolerance
2025-05-19 08:01:37 -05:00
Thaddeus Crews
5538850d87
Core: Convert Pair/KeyValue to constexpr
2025-05-15 10:37:41 -05:00
Silc Lizard (Tokage) Renew
37aca09b23
Fix Quaternion arc constructor tolerance
2025-05-14 07:15:12 +09:00
aaronp64
8fb3697916
Avoid single character String allocations when appending characters
...
Removed calls to String::chr() when appending characters to Strings in Expression, Resource, and VariantParser, to avoid creating temporary Strings for each character. Also updated the Resource case to resize String up front, since size is known.
2025-05-12 17:35:42 -04:00
aaronp64
1089f61868
Fix RandomPCG::random(int, int) overflow bug
...
- Use int64_t for subtraction before converting to uint32_t
- Don't add one to uint32_t max value for rand() bounds
2025-05-06 17:54:12 -04:00
Thaddeus Crews
01fc9aee6c
Core: Modernize C headers with C++ equivalents
2025-05-02 08:23:01 -05:00
Thaddeus Crews
3947cbe3b2
Merge pull request #104386 from Repiteo/core/cpp-math
...
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Lukas Tenbrink
7c37188ca1
Smoke test: In collections, log an error if reserve() is called with a number smaller than the current size. Don't log an error if it is called with a number smaller than the current capacity.
2025-04-23 16:47:47 +02:00
Thaddeus Crews
ad40939b6f
Core: Replace C math headers with C++ equivalents
...
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Marc Gilleron
5e6df6a196
Use Math::abs to avoid ambiguity with integer abs
2025-04-16 20:41:36 +02:00
Thaddeus Crews
29dcead192
Merge pull request #105394 from Zylann/quaternion_abs
...
Use Math::abs to avoid ambiguity with integer abs
2025-04-15 12:28:41 -05:00
Thaddeus Crews
53608e3376
Merge pull request #104239 from Ivorforce/optimize-undenormalize
...
Optimize reverb by removing stray `volatile` from the `undenormalize` function signature.
2025-04-14 19:39:46 -05:00
Marc Gilleron
40b5468c6d
Use Math::abs to avoid ambiguity with integer abs
2025-04-14 23:54:07 +02:00
Thaddeus Crews
94282d88f9
Core: Use Math namespace for constants
2025-04-10 16:29:30 -05:00
MewPurPur
45b1071e7c
Optimize Color.html()
2025-04-05 14:00:30 +03:00
Thaddeus Crews
207a2b6472
Core: Integrate warning suppression macro helpers
2025-04-03 10:13:46 -05:00
Thaddeus Crews
9f222d500d
Merge pull request #104375 from YYF233333/is_empty
...
Replace `size() == 0` with `is_empty()`
2025-04-02 07:37:31 -05:00
Yufeng Ying
4f4031a675
Replace size() == 0 with is_empty().
2025-04-02 19:18:43 +08:00
smix8
f2197a1013
Expose TriangleMesh api functions wrapped for scripting
...
Adds script wrapped TriangleMesh api functions to create and query the triangle BVH tree.
2025-04-02 09:52:35 +02:00
Thaddeus Crews
21956851ac
Merge pull request #104885 from MewPurPur/html-validation-optimization
...
Optimize Color HTML validation
2025-04-01 19:53:32 -05:00
MewPurPur
250cc58388
Optimize HTML color validation
2025-04-01 21:26:21 +03:00
Aaron Franke
c1acc839a8
Directly use segment points in Geometry2D/3D function parameters
2025-03-30 16:25:59 -07:00
Thaddeus Crews
3b1a481f13
Merge pull request #97843 from detomon/optimize-a-star-grid-2d-solve
...
Reduce allocations when solving path in `AStarGrid2D`
2025-03-30 09:06:02 -05:00
Zae
e7f7823236
Fix reversed hex order in Color::to_html
2025-03-29 06:06:09 +08:00
Rémi Verschelde
10799d0b44
Merge pull request #104389 from Ivorforce/color-string-append
...
Optimize `Color::to_html` by allocating less.
2025-03-28 14:32:54 +01:00
Yyf2333
22b5ec17fb
Using iterator pattern instead of List::Element *.
...
Co-authored-by: Adam Scott <ascott.ca@gmail.com >
2025-03-28 13:29:15 +08:00
Thaddeus Crews
2eec0fc526
Merge pull request #94441 from Repiteo/core/math-namespace
...
Core: Convert `Math` class to namespace
2025-03-23 19:03:55 -05:00
Thaddeus Crews
f09ee0171a
Style: Begin integrating simple .clangd fixes
2025-03-22 13:24:35 -05:00
Thaddeus Crews
581d675eeb
Core: Convert Math class to namespace
2025-03-21 10:29:18 -05:00
Lukas Tenbrink
143f8e933e
Optimize Color::to_html by allocating less.
2025-03-20 13:42:03 +01:00
kobewi
10f6c01b9c
Remove ABS in favor of Math::abs
2025-03-19 13:52:40 +01:00
Thaddeus Crews
85258ec1a5
Merge pull request #102662 from groud/chunk_tilemap_physics
...
Chunk tilemap physics
2025-03-17 16:03:29 -05:00
Thaddeus Crews
06f0c6369e
Merge pull request #104273 from Ivorforce/fabs-absf
...
Simplify and optimize `Math::absf` implementation to use `::fabs` and `::fabsf`.
2025-03-17 16:03:24 -05:00
Thaddeus Crews
ea62170dac
Core: Add constexpr constructors/operators to math structs
...
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
Lukas Tenbrink
24c11dea16
Simplify and optimize absf implementation to use std::fabs.
2025-03-17 14:50:15 +01:00
Lukas Tenbrink
a9745aac5c
Optimize reverb by removing stray volatile from the undenormalize function signature.
2025-03-16 15:50:50 +01:00
Aaron Franke
ced61da848
Add missing Projection constructor with 16 real_t values
2025-03-14 02:57:19 -07:00
Thaddeus Crews
74907876d3
Merge pull request #103759 from Ivorforce/zero-constructible
...
Optimize `Array.resize` by using `memset` (through new `is_zero_constructible` type trait)
2025-03-12 10:31:55 -05:00