swift2 - "Binary operator > cannot be applied to two Float operands" error -


i have conditional looks like:

if sqrtf(powf(starttouch.x - (touches.first as! uitouch).locationinview(self.view).y, 2) + powf(starttouch.y-(touches.first as! uitouch).locationinview(self.view).y, 2)) > dragthreshold as! float {         self.drag = false; } 

i getting error says binary operator > cannot applied 2 float operands. cannot understand why can't check if float greater float. error trying tell me?

the members of cgpoint of type cgfloat, , assuming on 64-bit architecture native type used store cgfloat double - try treating calculated values doubles (use sqrt() , pow() instead of float versions)... using dragthreshold double well


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -