Adds vector algebra functionality as member functions for Vector2<T>, with some methods limited to floating-point T.
Also adds UnitX and UnitY constants for the two axis unit vectors.
Transformable.cpp was originally compiled when I first submitted
PR #1973. While that PR was in review, #2012 got merged which
changed how tests are compiled. These two PR were in conflict so
when I went to resolve conflicts on #1973, I accidentaly removed
the line which added Transformable.cpp to the build. Because not
compiling this file caused no build breaks, nobody noticed until
after #1973 got merged. My bad, everybody.
This commit updates the NDK version to latest available at the
time.
The expectation from this change is to resolve issues with code
modernisation and to allow us to use C++ 17 features on Android.
This shouldn't affect devices supported as we're not changing the
API level.
For more details see:
https://developer.android.com/ndk/downloads/revision_history
This line was intended to silence a warning, however in the time
since that code was added in 95828a85a, the minimum required CMake
version was increased from 2.8.3 to 3.8. As of CMake 2.8.4 this
warning is no longer emitted which means we can remove this line.
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
The SFML target export set includes a number of external targets
which are not owned by the project itself. This includes targets
like Freetype and OpenGL. By specifying a namespace for the export
set, a SFML:: namespace was prepended to all targets. This is not
a problem when using shared libraries but when building and using
static libraries caused a problem where CMake was attempting and
failing to find targets with names like SFML::Freetype or
SFML::OpenGL which did not exist.
Luckily CMake allows you put namespaces in the EXPORT_NAME target
property so now we can just add the SFML:: namespace in the macro
which creates SFML targets and remove the `NAMESPACE SFML::` line
which was adding namespaces to all targets.
This is left over from 0f83e3d but we forgot to remove it. Nothing
about this file requires an elevated minimum CMake version now that
the FetchContent usage is gone.
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.
This has a number of benefits:
1. It's more idiomatic. Modern CMake libraries are expected to
have namespaced targets.
2. Namespaced targets are less likely to collide with user-defined
targets. No one will accidentally define a SFML:: target.
3. If a namespaced target is not found by CMake, configuration
will immediately stop.