|
Firefly 3.1.0
Standalone library for vector calculations
|
#include "firefly/vector.hpp"Go to the source code of this file.
Namespaces | |
| namespace | firefly |
| namespace | firefly::utilities |
| namespace | firefly::utilities::vector |
Functions | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::angle_between (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2, double delta=1e-6) |
| Calculates the angle between two vectors in radians. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| bool | firefly::utilities::vector::are_anti_parallel (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2) |
| Checks if two vectors are anti-parallel. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| bool | firefly::utilities::vector::are_parallel (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2) |
| Checks if two vectors are parallel. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| bool | firefly::utilities::vector::are_orthogonal (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2, double delta=1e-6) |
| Checks if two- vectors are orthogonal. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::area_parallelogram (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2) |
| Computes the area of the parallelogram formed by two vectors. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::area_triangle (firefly::vector< T, Length > const &v1, firefly::vector< U, Length > const &v2) |
| Computes the area of the triangle formed by two vectors. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::projection (firefly::vector< T, Length > const &source_vector, firefly::vector< U, Length > const &target_vector) |
| Projects a source vector onto a target vector. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::rejection (firefly::vector< T, Length > const &source_vector, firefly::vector< U, Length > const &target_vector) |
| Rejects a source vector from a target vector. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::distance (firefly::vector< T, Length > const &vector_a, firefly::vector< U, Length > const &vector_b) |
| Computes the Euclidean distance between two vectors. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::reflection (firefly::vector< T, Length > const &source_vector, firefly::vector< U, Length > const &target_vector) |
| Reflects a source vector across a target vector. | |
| template<vector_type T> | |
| constexpr auto | firefly::utilities::vector::rotate_2d (firefly::vector< T, 2 > const &vector, double angle_rad) |
| Rotates a 2D vector by a given angle (in radians). | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::scalar_projection (firefly::vector< T, Length > const &source_vector, firefly::vector< U, Length > const &target_vector) |
| Computes the scalar projection of a source vector onto a target vector. | |
| template<vector_type T, vector_type U, std::size_t Length> | |
| constexpr auto | firefly::utilities::vector::lerp (firefly::vector< T, Length > const &vector_a, firefly::vector< U, Length > const &vector_b, double t) |
| Performs linear interpolation (Lerp) between two vectors. | |