mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-03 12:28:07 +00:00
xrt: Use doubles in xrt_vec3_f64
This commit is contained in:
parent
5abd3b3570
commit
5845155229
src/xrt
|
@ -211,13 +211,13 @@ u_json_get_vec3_f64_array(const cJSON *json, struct xrt_vec3_f64 *out_vec3)
|
|||
return false;
|
||||
}
|
||||
|
||||
float array[3] = {0, 0, 0};
|
||||
double array[3] = {0, 0, 0};
|
||||
const cJSON *item = NULL;
|
||||
size_t i = 0;
|
||||
cJSON_ArrayForEach(item, json)
|
||||
{
|
||||
assert(cJSON_IsNumber(item));
|
||||
array[i] = (float)item->valuedouble;
|
||||
array[i] = item->valuedouble;
|
||||
++i;
|
||||
if (i == 3) {
|
||||
break;
|
||||
|
|
|
@ -172,9 +172,9 @@ struct xrt_vec3
|
|||
*/
|
||||
struct xrt_vec3_f64
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in a new issue