summaryrefslogtreecommitdiff
path: root/core/math
AgeCommit message (Collapse)Author
2019-04-05Added direction_to method to vectorsChaosus
2019-04-04Small fixes to static analyzer bugsqarmin
2019-04-01Merge pull request #27171 from Chaosus/randfixRémi Verschelde
Properly setup seed in RNG
2019-04-01Merge pull request #27485 from Faless/io/encode_decode_safety_prRémi Verschelde
Safer encode/decode variant.
2019-04-01Some improvements to is_equal_approx, restored Quat operator.Juan Linietsky
2019-04-01Add object encoding param to serialization methodsFabio Alessandrelli
Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
2019-03-27Properly setup seed in RNGChaosus
2019-03-21Add missing methods to Rect2ilupoDharkael
Replace inline with _FORCE_INLINE_ in short methods. Remove unused and redundant method no_area() as we already have has_no_area(). Add grow_individual() grow_margin() and expand() to Rect2i.
2019-03-19Improved uniformity of RandomPCG::randf.toasteater
When generating single precision floats, Godot casts a uint32_t to float, causing uniformity loss. This new randf, inspired by T. R. Campbell's random_real, samples the output of rand as the fraction part of an infinite binary number, with some tricks to reduce ops and branching. This method provides "good enough" uniformity at decent speed, for floats greater than 2^-64. Smaller numbers are floored to 0.
2019-03-17Added normally distributed generation function to RNGChaosus
2019-03-16Merge pull request #25495 from IronicallySerious/fix-expand-macrosRémi Verschelde
Fix parameterised macros in core. Addresses #25488
2019-03-07Fix -Wc++11-extensions warning after #26737Rémi Verschelde
Fixes #26769.
2019-03-07Fixed get_seed() not returning the correct seed.MidZik
2019-03-06Fixes Geometry.segment_intersects_circle working only one way.Christoph Schroeder
2019-03-04TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix ↵Mariano Suligoy
for #24003
2019-03-02Fix new GCC 9 warnings: -Wdeprecated-copy.marxin
2019-03-01Scale quickhull tolerance with mesh sizeHein-Pieter van Braam
Taken from three.js's implementation. Tested with a wide variety of meshes.
2019-02-26Remove setting that caused is_inside_tree() errors on doppler tracking enabled.Juan Linietsky
2019-02-25Several fixes to make GLES2 on HTML5 work much better.Juan Linietsky
Changed math class error reporting to be a bit less paranoid.
2019-02-25Fix wrapi to use int64_t instead intChaosus
2019-02-23Fix crash when using `wrapi()` with a range of zeroHugo Locurcio
`wrapi()` and `wrapf()` will now return the value of the `min` parameter if the range is equal to zero.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-20fixed AStar improper point deletion (leads to crash)hedin
2019-02-19Add FRUSTUM camera mode, allowing tilted frustumsJFonS
This new camera mode makes it easy to create tilted frustums for mirror or portal effects. This work was kindly sponsored by IMVU.
2019-02-18Fix parameterised macros in core. Addresses #25488IronicallySerious
This adds the saves the programmer of doing something like SWAP(x++, y--) and getting the wrong result unless the parameters are evaluated before use.
2019-02-16Merge pull request #25680 from Chaosus/random_fixRémi Verschelde
Fix random generation, to not always retrieve 0 after seed()
2019-02-16Fix typo for randd and randfPierrick Brunet
* And improve documentation according to issue #25938
2019-02-13Merge pull request #25821 from akien-mga/sync-class-and-filenamesRémi Verschelde
Ensure classes match their header filename
2019-02-12[Core] Transform2D add set_scale and fix set_rotationAaron Franke
Note: These are still not exposed to GDScript
2019-02-12Core: Ensure classes match their header filenameRémi Verschelde
Also drop some unused files. Renamed: - `core/dvector.h` -> `pool_vector.h` - `core/io/resource_import.h` -> `resource_importer.h` - `core/sort.h` -> `sort_array.h` - `core/string_db.h` -> `string_name.h` Dropped: - `core/allocators.h` - `core/os/shell.h` - `core/variant_construct_string.cpp`
2019-02-10Fix random generation, to not retrieve 0 after seed()Chaosus
2019-02-09[Core] Rename Matrix3 file to BasisAaron Franke
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-01-30Fix AStar crashing with large (>1e30) estimated valuesBojidar Marinov
Fixes #21601
2019-01-23Revert "Revert "Update random_pcg.h""Rémi Verschelde
This reverts commit 6f704c338aa7448a65ced554804ae568063f35eb. Sorry about this, this was a test and not meant to be pushed to master. :/
2019-01-23Revert "Update random_pcg.h"Rémi Verschelde
This reverts commit 64e584a97e0505cec592d3c98a2899ba8426f35a.
2019-01-20Fix HTML5 build warningLeon Krause
2019-01-13Revert "fixed invalid implementation of Plane::intersects_segment and ↵Rémi Verschelde
Plane::intersects_ray"
2019-01-12fixed invalid implementations of Plane::intersects_segment and ↵Evgeny Savelyev
Plane::intersects_ray
2019-01-08Removed splits in Polygon editor, replace by internal vertices and polygon ↵Juan Linietsky
support.
2019-01-07Update random_pcg.hCalamander
little fix to function types
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-12Merge pull request #24135 from Chaosus/rngRémi Verschelde
Added ranged integer generation function to RNG class
2018-12-11Moved member variables to initializer listWilson E. Alvarez
2018-12-06Added integer number generation function to RNG classChaosus
2018-11-20Remove trailing whitespaceRémi Verschelde
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'` (+ manual revert of some thirdparty code under `platform/android`).
2018-11-14Ensure that array passed to physics is always counter clockwise, fixes #15361.Juan Linietsky
2018-11-13Implement random number generatorChaosus
Co-authored-by: Zirak <zirakertan@gmail.com>
2018-11-02Remove unused "dtoll" methodsAaron Franke
These methods aren't used anywhere in Godot's code, and all they do is cast floating types to int64_t. There's no reason to have these lines, they literally do nothing, and they aren't useful functions to begin with.
2018-10-28Error running Expression.execute after parse errorsantouits
There happens a segmentation fault when you use Expression.parse() and you don't check for errors and then run Expression.execute(). So we check if there was a parse error in the execute method now.
2018-10-07Merge pull request #22722 from akien-mga/fix-warningsRémi Verschelde
Fix more "may be used initialized" warnings from GCC 7