Age | Commit message (Collapse) | Author |
|
Use is_zero_approx(), avoid a negative, and also rename "rng" to "range".
|
|
Inspector: Make default float step configurable
|
|
|
|
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).
Supersedes #25470.
Partial fix for #18251.
|
|
Added lerp_angle built-in function
|
|
Changed some code reported by LGTM and Coverity
|
|
Co-authored-by: Xrayez <https://github.com/Xrayez>
Co-authored-by: DleanJeans <https://github.com/DleanJeans>
|
|
|
|
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator.
I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
|
|
when doing Vector3 slerp it is not necessary to have it normalized.
|
|
Pass by reference to const
|
|
|
|
Fixes #30431, regression from #30277.
|
|
Some small optimizations in core/math/geometry.h.
|
|
By combining all scalar factors we can get rid of a scalar * vector
multiplication and a square root operation, since the resulting formula
only uses the squared length.
|
|
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
|
|
|
|
|
|
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).
We still use CPPFLAGS for some pre-processor flags which are not
defines.
|
|
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.
To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.
If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.
Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
|
|
Remove unnecessary code and add some error explanations
|
|
|
|
AStar get_current_point enabled consideration
|
|
|
|
|
|
|
|
Added 2D functions to AStar
|
|
|
|
Fix the performance of remove_point of AStar
|
|
Validate parameters of randi_range()
|
|
|
|
Improved uniformity of RandomPCG::randf.
|
|
|
|
Improve the performance of remove_point because it doesn't have to search every neighbour of every node
|
|
Added move_toward functions for float, Vector2 and Vector3
|
|
|
|
|
|
Optimize Basis constructor for Axis Angle
|
|
Can be used via scripting as `Geometry.triangulate_delaunay_2d(points)`
The interface is the same as in `Triangulate` library, returning indices
into triangulated points.
|
|
Clipper 6.4.2 is used internally to perform polypaths clipping, as well
as inflating/deflating polypaths. The following methods were added:
```
Geometry.merge_polygons_2d(poly_a, poly_b) # union
Geometry.clip_polygons_2d(poly_a, poly_b) # difference
Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection
Geometry.exclude_polygons_2d(poly_a, poly_b) # xor
Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate
Geometry.offset_polyline_2d(polyline, delta) # returns polygons
// This one helps to implement CSG-like behaviour:
Geometry.transform_points_2d(points, transform)
```
All the methods return an array of polygons/polylines. The resulting
polygons could possibly be holes which could be checked with
`Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
|
|
Using codespell 1.15.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
|
|
Improve the performance of AStar
|
|
|
|
|
|
|
|
Small fixes to static analyzer bugs
|
|
In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
|
|
Add missing methods to Rect2i
|
|
|
|
|