converted multiple statements into single-line ternary statement
added <cmath> header and added std:: to cos() and sin()
added unnamed namespace for randomization initializations to prevent linker errors in case the same names are used in other files
added const keyword at the end of the header of each accessor