aboutsummaryrefslogtreecommitdiff
path: root/core/math/math_2d.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add SLERP to Vector{2,3}, optimize Quat's Vector3 rotation.tagcup2018-05-121-0/+9
| | | | Also even out Basis and Quat APIs a little.
* Vector3::round, Vector2::round & Vector2::ceil methods were added.Alexander Alekseev2018-05-041-0/+2
| | | | | Now both structs (Vector2 & Vector3) have round, floor & ceil methods. (see #18603)
* Fix for clang warning at distance_toMarcelo Fernandez2018-03-221-1/+1
|
* Bring back Vector2.cross()Bernhard Liebl2018-03-071-1/+0
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #15091 from poke1024/fix-rect2-distance-toNoshyaar2018-01-011-6/+15
|\ | | | | Fix Rect2::distance_to() not returning 0
| * Fix Rect2::distance_to() not returning 0Bernhard Liebl2017-12-271-6/+15
| |
* | Merge pull request #15045 from poke1024/vector2-inlineNoshyaar2017-12-271-0/+64
|\ \ | |/ |/| Inline some very common Vector2 operations
| * Inline some very common Vector2 operationsBernhard Liebl2017-12-251-0/+64
| |
* | Fixes grow_margin not working at allGilles Roudiere2017-12-211-1/+2
|/
* Merge pull request #13347 from Noshyaar/hang_in_thereRémi Verschelde2017-12-091-0/+5
|\ | | | | Rect2: add function returning same rect with positive w and h
| * Rect2: add function returning same rect with positive w and hPoommetee Ketson2017-11-281-0/+5
| |
* | Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-15/+15
|/
* Dead code tells no talesRémi Verschelde2017-08-271-1/+0
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Merge pull request #8899 from toger5/BetterFlatStyleboxRémi Verschelde2017-08-161-0/+8
|\ | | | | Better flat stylebox with rounded corners
| * Added Corner Enumtoger52017-08-151-0/+8
| |
* | Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-16/+16
|/ | | | Fixes #10244.
* Moved member variables from constructor to initialization listWilson E. Alvarez2017-08-081-15/+15
|
* Fix build error, commit bee81d5Poommetee Ketson2017-06-081-2/+2
|
* 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-041-105/+105
|/
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Made slide and reflect active verbs acting on itself in Vector2 and Vector3.Ferenc Arn2017-04-031-0/+2
| | | | | | | 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.
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-347/+359
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Make nan==nan true for GDScript"Juan Linietsky2017-02-141-3/+0
|
* Make nan==nan true for GDScriptHein-Pieter van Braam2017-02-141-0/+3
| | | | | | | | | | | | | 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
* Vector2.get_aspect() renamed to Vector2.aspect() to keep consistent method ↵Juan Linietsky2017-01-131-1/+1
| | | | naming
* Type renames:Juan Linietsky2017-01-111-28/+28
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
* Various corrections in 2D math.Ferenc Arn2017-01-101-43/+53
| | | | | | | | This is the follow up for the 2D changes mentioned in PR #6865. It fixes various mistakes regarding the order of matrix indices, order of transformation operations, usage of atan2 function and ensures that the sense of rotation is compatible with a left-handed coordinate system with Y-axis pointing down (which flips the sense of rotations along the z-axis). Also replaced float with real_t, and tried to make use of Matrix32 methods rather than accessing its elements directly. Affected code in the Godot code base is also fixed in this commit. The user code using functions involving angles such as atan2, angle_to, get_rotation, set_rotation will need to be updated to conform with the new behavior. Furthermore, the sign of the rotation angles in existing 2D scene files need to be flipped as well.
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Fix for #6158. Converting Vector2 to Size2 for scaling functions.anneomcl2016-09-191-10/+5
|
* Matrix32: Add constructor that takes six real_t paramsIgnacio Etcheverry2016-08-241-0/+9
|
* Fix regression with str() improvements for math typesIgnacio Etcheverry2016-07-281-4/+4
|
* Prettier str() for some math typesIgnacio Etcheverry2016-07-271-4/+4
|
* remove trailing whitespaceHubert Jarosz2016-03-091-46/+46
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* -remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260Juan Linietsky2015-11-191-1/+1
|
* new file dialog!Juan Linietsky2015-06-061-0/+23
| | | | | | | | | -ItemList control for easier lists/thumbnails -New file dialog, with support for thumbnails, favorites, recent places, etc -Moved .fscache out of the project, no more bugs due to committed/pulled .fscache! -Dir dialog now sorts directories
* Corrected rectangle intersection, fixes #1731Juan Linietsky2015-04-241-4/+4
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* support for light and normal mapping in 2DJuan Linietsky2015-02-181-2/+160
|
* Small Issues & MaintenanceJuan Linietsky2014-08-011-1/+2
| | | | | | | | | -=-=-=-=-=-=-=-=-=-=-=-=-= -Begin work on Navigation Meshes (simple pathfinding for now, will improve soon) -More doc on theme overriding -Upgraded OpenSSL to version without bugs -Misc bugfixes
* 2D Animation ImprovementsJuan Linietsky2014-07-061-0/+3
| | | | | | | | | -=-=-=-=-=-=-=-=-=--=-=-= -Ability to set 2D nodes as bones -Abity to set 2D nodes as IK chains -2D IK Solver -Improvements in the UI for adding keyframes (separate loc,rot,scale buttons)
* text cursor in text editor & const in Rect2ijonyrock2014-04-171-4/+4
|
* -improved physics ccdJuan Linietsky2014-02-191-0/+2
| | | | | | -html5 exporter works again -disable repeat on image loader by default -can change shape offset en tileset, texture offset was broken
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+670