aboutsummaryrefslogtreecommitdiff
path: root/core/math (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8981 from toger5/addedGrowFunctionRémi Verschelde2017-06-081-0/+19
|\ | | | | implemented grow(left,top,right,bottom) function
| * added grow functions to Rect2toger52017-06-051-0/+19
| | | | | | | | | | - grow_individual - grow_margin
* | renamed all Rect2.pos to Rect2.positionalexholly2017-06-043-108/+108
| |
* | Changed enum to const because enum with uint64 size does not work on VSC++ ↵Thomas Görlich2017-05-291-3/+1
|/ | | | Compiler
* -Added EXR supprot for HDR (no BC6 compression yet though)Juan Linietsky2017-05-261-0/+4
| | | | | | -Improvements to texture importer -Proper detection of S3TC compression modes, and added all modes to Image -Fixes to non-power of 2 compressed textures, which should all be supported by GLES3
* Merge pull request #8786 from bojidar-bg/fix-astar-weight-scaleRémi Verschelde2017-05-221-4/+2
|\ | | | | Fix weigth scale of A* being applied to the whole estimation
| * Fix weigth scale of A* being applied to the whole path and estimationBojidar Marinov2017-05-221-5/+2
| | | | | | | | Attempt to fix #8584
* | Avoid overestimating the cost in AStar heuristics.Ferenc Arn2017-05-211-1/+1
| | | | | | | | | | | | | | This is a necessary condition for finding optimal solutions. This is achieved by simply requiring/ensuring that no weights are smaller than 1. Fixes #8584.
* | Added bool to allow astar points to be connected in one direction onlyFabian Mathews2017-05-192-4/+6
|/
* Move core thirdparty files to thirdparty/{minizip,misc}Rémi Verschelde2017-04-285-1886/+2
|
* Merge pull request #8277 from tagcup/math_checksRémi Verschelde2017-04-248-42/+133
|\ | | | | Added various functions basic math classes. Also enabled math checks …
| * Added various functions basic math classes. Also enabled math checks only ↵Ferenc Arn2017-04-068-42/+133
| | | | | | | | | | | | | | | | for debug builds. Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly. Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions. Various other changes mostly cosmetic in nature.
* | Fix PRNG randomization.Ferenc Arn2017-04-172-5/+3
| | | | | | | | | | | | | | | | PCG32 doesn't like small seeds, which leads to zero random values (prior to #7532, zero values were handled as special cases). Use a large default seed, and also add a shift in Math::randomize. Fixes #8423.
* | Particle system is complete. Rejoice!Juan Linietsky2017-04-081-10/+11
| |
* | Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-0836-0/+36
| |
* | New particle system, mostly working, some small features missing.Juan Linietsky2017-04-061-23/+0
|/
* Merge pull request #8214 from tagcup/bounce_reflect_slideRémi Verschelde2017-04-053-9/+35
|\ | | | | Made slide and reflect active verbs acting on itself in Vector2 and V…
| * Made slide and reflect active verbs acting on itself in Vector2 and Vector3.Ferenc Arn2017-04-033-9/+35
| | | | | | | | | | | | | | This is in alignment with other functions in vector classes. Also added checks for normalization, fixed the sign of reflect (which now corresponds to reflection along a plane mathematically), added bounce method and updated docs. Fixes #8201.
* | Merge pull request #8146 from supagu/astarRémi Verschelde2017-04-032-3/+25
|\ \ | |/ |/| Added ability to change A-star cost function
| * Added ability to change A-star cost functionFabian Mathews2017-04-012-3/+25
| |
* | Fix polar decomposition in 2D.Ferenc Arn2017-03-291-2/+2
|/ | | | | | | When performing polar decomposition in 2D as B = R.S, where R is rotation (with determinant +1) and S is scaling, use the convention that reflections are absorbed into S through a reflection around y axis. In 3D, this is done by using a reflection along all three axes, but since the dimensionality is even in 2D, one axis needs to be chosen. Fixes Matrix32::get_rotation and Matrix32::get_scale (which weren't properly fixed in #7445).
* Merge pull request #8132 from tagcup/vector3_angle_toRémi Verschelde2017-03-241-1/+1
|\ | | | | Use atan2 rather than acos in Vector3.angle_to.
| * Use atan2 rather than acos in Vector3.angle_to.Ferenc Arn2017-03-241-1/+1
| | | | | | | | Fixes #8111.
* | Merge pull request #8122 from tagcup/axis_check_normalizationRémi Verschelde2017-03-242-0/+7
|\ \ | | | | | | Explicitly documented that Transform.basis is not necessarily an orth…
| * | Explicitly documented that Transform.basis is not necessarily an orthogonal ↵Ferenc Arn2017-03-232-0/+7
| |/ | | | | | | | | | | | | | | matrix. Also added a check that in axis-angle rotations, axis is a normalized vector, and modified the docs accordingly. Fixes #8113.
* / Fix typos in source code using codespellRémi Verschelde2017-03-246-7/+7
|/ | | | From https://github.com/lucasdemarchi/codespell
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-0536-5050/+4530
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Add a bunch of missing Godot headers in own filesRémi Verschelde2017-03-052-0/+56
|
* Fix RANDOM_MAX, which is 2^32-1 with PCG32.Leandro Motta Barros2017-03-011-1/+1
|
* Inf and NaN support added to GDScript.Saracen2017-02-281-0/+1
|
* Correct hash behavior for floating point numbersHein-Pieter van Braam2017-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes HashMap where a key or part of a key is a floating point number. To fix this the following has been done: * HashMap now takes an extra template argument Comparator. This class gets used to compare keys. The default Comperator now works correctly for common types and floating point numbets. * Variant implements ::hash_compare() now. This function implements nan-safe comparison for all types with components that contain floating point numbers. * Variant now has a VariantComparator which uses Variant::hash_compare() safely compare floating point components of variant's types. * The hash functions for floating point numbers will now normalize NaN values so that all floating point numbers that are NaN hash to the same value. C++ module writers that want to use HashMap internally in their modules can now also safeguard against this crash by defining their on Comperator class that safely compares their types. GDScript users, or writers of modules that don't use HashMap internally in their modules don't need to do anything. This fixes #7354 and fixes #6947.
* Many fixes to make exported scenes work better, still buggy.Juan Linietsky2017-02-151-0/+28
|
* Revert "Make nan==nan true for GDScript"Juan Linietsky2017-02-148-48/+1
|
* Make nan==nan true for GDScriptHein-Pieter van Braam2017-02-148-1/+48
| | | | | | | | | | | | | After discussing this with Reduz this seemed like the best way to fix #7354. This will make composite values that contain NaN in the same places as well as the same other values compare as the same. Additionally non-composite values now also compare equal if they are both NaN. This breaks IEEE specifications but this is probably what most users expect. There is a GDScript function check for NaN if the user needs this information. This fixes #7354 and probably also fixes #6947
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-13/+13
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* WIP new AudioServer, with buses, effects, etc.Juan Linietsky2017-01-211-0/+33
|
* Merge pull request #7528 from tagcup/real_t_float_fixesJuan Linietsky2017-01-2026-474/+402
|\ | | | | Use real_t rather than float or double in generic functions (core/mat…
| * Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn2017-01-1626-474/+402
| | | | | | | | | | | | than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
* | Some changes in the header so Godot3 compiles again on Windows.BastiaanOlij2017-01-182-7/+2
|/
* Merge pull request #7532 from tagcup/pcg_prngRémi Verschelde2017-01-164-16/+45
|\ | | | | Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
| * Replace the existing PRNG (Xorshift31) with (minimal) PCG (XSH-RR variant ↵Ferenc Arn2017-01-154-16/+45
| | | | | | | | | | | | with 32-bit output, 64-bit state). PCG is better than many alternatives by many metrics (see www.pcg-random.org) including statistical quality with good speed.
* | Fix compile errors related to audio on OSXBastiaanOlij2017-01-161-8/+8
| |
* | Style: Various fixes to play nice with clang-formatRémi Verschelde2017-01-162-34/+56
| |
* | Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-1/+1
| |
* | Style: Cleanups, added headers, renamed filesRémi Verschelde2017-01-168-9/+9
| | | | | | | | | | | | | | | | | | Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).
* | Oops! Audio engine has vanished :DJuan Linietsky2017-01-152-0/+30
|/
* Style: Fix whole-line commented codeRémi Verschelde2017-01-146-14/+20
| | | | | They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
* Vector2.get_aspect() renamed to Vector2.aspect() to keep consistent method ↵Juan Linietsky2017-01-131-1/+1
| | | | naming
* made math functions inlnieJuan Linietsky2017-01-122-131/+119
|
* Type renames:Juan Linietsky2017-01-1122-297/+296
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray