getMaxTangent implementation