Posts Tagged ‘conversion’

It can sometimes be useful to estimate the Snellen or logMAR acuity of a patient based on the size of the font they read at near. While there are tables available showing the conversions, this can not cover all font sizes and reading distances. With some basic trigonometry, you can do the calculations yourself. First, […]

Imagine that you have read in a hexadecimal string from the command line, a config file or whatever, and you want to use this value in your program. To do this, you need to do a string to integer conversion, but in base 16 since it’s a hexadecimal string. To do this, you can use […]