-
Notifications
You must be signed in to change notification settings - Fork 0
/
vec3double.cuh
executable file
·46 lines (32 loc) · 1.61 KB
/
vec3double.cuh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef VEC3DOUBLE_CUH
#define VEC3DOUBLE_CUH
struct vec3double
{
union {double x; double u; double r;};
union {double y; double v; double g;};
union {double z; double w; double b;};
__host__ __device__ double length();
__host__ __device__ double length2();
__host__ __device__ vec3double normalized();
__host__ __device__ vec3double();
__host__ __device__ vec3double(const vec3double &vec);
__host__ __device__ vec3double(double d);
__host__ __device__ vec3double(double x, double y, double z);
__host__ __device__ vec3double operator-() const;
__host__ __device__ vec3double& operator+=(vec3double vec);
__host__ __device__ vec3double& operator-=(vec3double vec);
__host__ __device__ vec3double& operator*=(vec3double vec);
__host__ __device__ vec3double& operator*=(double d);
__host__ __device__ vec3double& operator/=(vec3double vec);
__host__ __device__ vec3double& operator/=(double d);
};
__host__ __device__ double dot(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double cross(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double operator+(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double operator-(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double operator*(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double operator*(vec3double vec, double d);
__host__ __device__ vec3double operator*(double d, vec3double vec);
__host__ __device__ vec3double operator/(vec3double vec1, vec3double vec2);
__host__ __device__ vec3double operator/(vec3double vec, double d);
#endif // VEC3DOUBLE_CUH