Single-crystal (100)-oriented YMnO3 thin films grown on (110)-oriented SrTiO3 substrates have been studied by polarized extended x-ray absorption fine structure to determine the Mn-O bond lengths. Using a simple geometrical model and previously reported x-ray diffraction data on the same samples, the Mn-O-Mn bonding angles are calculated. We show that the epitaxy-induced in-plane anisotropic strain has a dramatic impact on the bonding angles, allowing the rationalization of the reported existence of cycloidalmagnetic order and concomitant ferroelectricity in moderately strained films and the gradual suppression by larger strains. We shall argue that epitaxial strain allows shifting YMnO3 from an E-type to A-type antiferromagnetic ground state, crossing a cycloidal magnetic region.