Commit Graph

1133 Commits

Author SHA1 Message Date
6c2d288ef1 Merge pull request #106337 from TokageItLab/arc-tolerance
Fix Quaternion arc constructor tolerance
2025-05-19 08:01:37 -05:00
5538850d87 Core: Convert Pair/KeyValue to constexpr 2025-05-15 10:37:41 -05:00
37aca09b23 Fix Quaternion arc constructor tolerance 2025-05-14 07:15:12 +09:00
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
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
01fc9aee6c Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
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
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
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
5e6df6a196 Use Math::abs to avoid ambiguity with integer abs 2025-04-16 20:41:36 +02:00
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
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
40b5468c6d Use Math::abs to avoid ambiguity with integer abs 2025-04-14 23:54:07 +02:00
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
45b1071e7c Optimize Color.html() 2025-04-05 14:00:30 +03:00
207a2b6472 Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
9f222d500d Merge pull request #104375 from YYF233333/is_empty
Replace `size() == 0` with `is_empty()`
2025-04-02 07:37:31 -05:00
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
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
21956851ac Merge pull request #104885 from MewPurPur/html-validation-optimization
Optimize Color HTML validation
2025-04-01 19:53:32 -05:00
250cc58388 Optimize HTML color validation 2025-04-01 21:26:21 +03:00
c1acc839a8 Directly use segment points in Geometry2D/3D function parameters 2025-03-30 16:25:59 -07:00
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
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
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
2eec0fc526 Merge pull request #94441 from Repiteo/core/math-namespace
Core: Convert `Math` class to namespace
2025-03-23 19:03:55 -05:00
f09ee0171a Style: Begin integrating simple .clangd fixes 2025-03-22 13:24:35 -05:00
581d675eeb Core: Convert Math class to namespace 2025-03-21 10:29:18 -05:00
143f8e933e Optimize Color::to_html by allocating less. 2025-03-20 13:42:03 +01:00
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
85258ec1a5 Merge pull request #102662 from groud/chunk_tilemap_physics
Chunk tilemap physics
2025-03-17 16:03:29 -05:00
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
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
24c11dea16 Simplify and optimize absf implementation to use std::fabs. 2025-03-17 14:50:15 +01:00
a9745aac5c Optimize reverb by removing stray volatile from the undenormalize function signature. 2025-03-16 15:50:50 +01:00
ced61da848 Add missing Projection constructor with 16 real_t values 2025-03-14 02:57:19 -07:00
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
75bc471965 Add is_zero_constructible to denote if a type can be semi-trivially constructed with all 0 bytes.
Optimize `CowData` and `LocalVector` resize for zero constructible types.
Mark several compatible types as `is_zero_constructible`.
2025-03-12 09:49:24 +01:00
5c66129e62 Allow to select multiple remote nodes at runtime 2025-03-11 12:35:41 -03:00
a13067e61f Merge pull request #97553 from AThousandShips/semantic_equal
[Core] Add `is_same` to types that have float components
2025-03-10 10:01:05 -05:00
331a43a9d8 Add String::remove_char(s) methods for performance and convenience 2025-03-10 13:19:28 +01:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
c937b6d180 Merge pull request #102419 from Ivorforce/std-size
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06:00
3d816853e5 Merge pull request #100209 from Flarkk/simplify_fix_projection
Simplify and fix `Projection`'s getter functions
2025-03-06 16:36:19 -06:00
1d416fc2ba Simplify and fix Projection's getter functions 2025-03-06 16:48:01 +01:00
4765bc883c Chunk tilemap physics 2025-02-11 16:28:58 +01:00
e34f1f504c Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase. 2025-02-07 14:57:48 +01:00
b50d9742c2 Fix is_valid_float, Variant parser, Expression parser, script highlighter, and TextServer not handing capital E in scientific notation. 2025-02-05 18:39:40 +02:00
3be46a69c4 Fix uppercase B and X parsing in the integer literals. 2025-02-05 16:02:06 +02:00