adaptive aligned std::array based vector types (#686)

This commit is contained in:
Jon Daniel
2025-05-08 12:36:35 -07:00
committed by GitHub
parent 19762b9282
commit adda1c1f15
131 changed files with 3396 additions and 3592 deletions

View File

@@ -942,12 +942,12 @@ void DrawItemModel(grHardwareSurface *surf, int model_num) {
// Calculate viewer position
vector maxs = pm->maxs, mins = pm->mins;
view_pos.x = -(mins.x + maxs.x) / 2;
view_pos.y = (mins.y + maxs.y) / 2;
maxs.x += view_pos.x;
maxs.y -= view_pos.y;
maxs.z = 0;
view_pos.z = -2.5 * vm_GetMagnitude(&maxs);
view_pos.x() = -(mins.x() + maxs.x()) / 2;
view_pos.y() = (mins.y() + maxs.y()) / 2;
maxs.x() += view_pos.x();
maxs.y() -= view_pos.y();
maxs.z() = 0;
view_pos.z() = -2.5 * vm_GetMagnitude(&maxs);
// Set viewer and object orientations
vm_MakeIdentity(&id_matrix);
@@ -1212,12 +1212,12 @@ void CObjectDialog::OnRegroundButton() {
fate = fvi_FindIntersection(&fq, &hit_info);
if (fate != HIT_NONE) {
float ps;
float pr;
float diff;
scalar ps;
scalar pr;
scalar diff;
ps = (gp - obj->pos) * obj->orient.uvec;
pr = (hit_info.hit_pnt - obj->pos) * obj->orient.uvec;
ps = vm_Dot3Product((gp - obj->pos), obj->orient.uvec);
pr = vm_Dot3Product((hit_info.hit_pnt - obj->pos), obj->orient.uvec);
if (ps != pr) {
diff = ps - pr;