summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-21 15:54:16 -0500
committerXANTRONIX Development2022-02-21 15:54:16 -0500
commit4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5 (patch)
treedf7b73a10bd826fa9f4917d6c5a64d94dc25fcf2 /src
parent10146ed38f99951b11e58e5b930c260f6945f19f (diff)
downloadxas-4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5.tar.gz
xas-4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5.tar.bz2
xas-4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5.zip
do a heckin' relocate :3
Diffstat (limited to 'src')
-rw-r--r--src/spatial.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/spatial.c b/src/spatial.c
index 02a4bf3..e49f668 100644
--- a/src/spatial.c
+++ b/src/spatial.c
@@ -12,6 +12,28 @@ static inline float dist(xas_spatial_coord a, xas_spatial_coord b) {
+ powf(b.z - a.z, 2.0f), 0.5f);
}
+static float dotf(float *sets, size_t count, size_t len) {
+ float ret = 0.0f;
+
+ size_t x, y;
+
+ if (count == 0 || len == 0) {
+ return 0.0f;
+ }
+
+ for (x=0; x<count; x++) {
+ float num = sets[x*len+0];
+
+ for (y=1; y<len; y++) {
+ num *= sets[x*len+y];
+ }
+
+ ret += num;
+ }
+
+ return ret;
+}
+
static void rotate(xas_spatial_rotation rotation,
xas_spatial_coord *coord) {
double cosY = cos(rotation.y),
@@ -87,28 +109,6 @@ static int within_cone(xas_spatial_coord coord,
return 1;
}
-static float dotf(float *sets, size_t count, size_t len) {
- float ret = 0.0f;
-
- size_t x, y;
-
- if (count == 0 || len == 0) {
- return 0.0f;
- }
-
- for (x=0; x<count; x++) {
- float num = sets[x*len+0];
-
- for (y=1; y<len; y++) {
- num *= sets[x*len+y];
- }
-
- ret += num;
- }
-
- return ret;
-}
-
static int buffer_realloc(xas_spatial_scene *scene,
xas_spatial_buffer *buffer) {
float seconds = scene->radius / scene->speed;