dinex86 / FOV-Calculator

A simple and lightweight 'Field of View' calculator for modern racing simulations.
https://dinex86.github.io/FOV-Calculator/
MIT License
56 stars 20 forks source link

Display calculated triple screen angle #1

Closed jlnprssnr closed 4 years ago

jlnprssnr commented 5 years ago

I see that you calculate the angle of triple screens in the code, but don't display this. As your calulated FoV is only correct for the mathematically correct triple angles (Which many don't know and just default to 45°), you should also display those alongside. Also, shouldn't the full width of the monitor be used for this, instead of the display area? At least according to this.

groybe commented 4 years ago

Hi, I've had ago at this. Though I'm learning as I go. Doesn't it already calculate based on monitor width? Like this: var width = Math.cos(Math.atan(y/x)) * screensizeDiagonal;

Anyway I have it working as far as I understand it in my fork. If you'd like to test it then i could have a go at getting it merged? Thanks.

jlnprssnr commented 4 years ago

That's the panel width, not the monitor width. With triples you have to take into account the full width of the monitor, otherwise the angle is wrong. See the link I posted above :)

groybe commented 4 years ago

Oh I gotcha FullDeviceWidth. I will have to add an option for bezel width.

groybe commented 4 years ago

I've fixed it. I'm not sure dinex86 is around though we will see. https://groybe.github.io/FOV-Calculator/

dinex86 commented 4 years ago

Merged.

groybe commented 4 years ago

Thanks!! I learned a bunch off your code. The new spacings of the results looks great!