const Vector &minp = bbox.get_minimum_point();
const Vector &maxp = bbox.get_maximum_point();
- float t = tan(camera.get_field_of_view()/2)*2;
+ float t = tan(camera.get_field_of_view()/2.0f)*2.0f;
float size = max((maxp.y-minp.y+0.1), (maxp.x-minp.x+0.1)/camera.get_aspect());
float dist = size/t;
if(!tight)
- dist += sin(camera.get_field_of_view()/2)*size;
+ dist += sin(camera.get_field_of_view()/2.0f)*size;
GL::Vector3 center = (minp+maxp)/2.0f;
const GL::Vector3 &look = camera.get_look_direction();
camera.set_position(center-look*dist);
const Layout3D::TrackMap &tracks = layout_3d.get_tracks();
float view_aspect = float(window.get_width()-200)/window.get_height();
- float view_height = tan(camera.get_field_of_view()/2)*2;
+ float view_height = tan(camera.get_field_of_view()/2.0f)*2.0f;
float best_score = 0;
GL::Vector3 pos;
GL::Vector3 up;