There are only two possible and equally simple strategies here — either derive the polar or the cartesian coordinates . Both functions are based on the same unique state so it should never be possible for tests to pass individually but fail when cross referenced.