Loading...
Searching...
No Matches
Classes | Functions
vec_2d.hpp File Reference
#include <cuproj/detail/utility/cuda.hpp>
#include <cuproj/detail/utility/floating_point.hpp>
#include <algorithm>
#include <ostream>

Go to the source code of this file.

Classes

class  cuproj::vec_2d< T >
 A generic 2D vector type. More...
 

Functions

template<typename T >
 cuproj::vec_2d (T x, T y) -> vec_2d< T >
 
template<typename T >
T CUPROJ_HOST_DEVICE cuproj::dot (vec_2d< T > const &a, vec_2d< T > const &b)
 Compute dot product of two 2D vectors.
 
template<typename T >
T CUPROJ_HOST_DEVICE cuproj::det (vec_2d< T > const &a, vec_2d< T > const &b)
 Compute 2D determinant of a 2x2 matrix with column vectors a and b.
 
template<typename T >
vec_2d< T > CUPROJ_HOST_DEVICE cuproj::box_min (vec_2d< T > const &a, vec_2d< T > const &b)
 Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.
 
template<typename T >
vec_2d< T > CUPROJ_HOST_DEVICE cuproj::box_max (vec_2d< T > const &a, vec_2d< T > const &b)
 Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.
 
template<typename T >
vec_2d< T > CUPROJ_HOST_DEVICE cuproj::midpoint (vec_2d< T > const &first, vec_2d< T > const &second)
 Compute the midpoint of first and second.