Souhaieb Souhaieb - 1 year ago 74
Swift Question

ios - what is the meaning of greater mark ">" in swift?

can any one explain what is the meaning of ">" symbol in swift generally,
and in the sample code below:

node.hidden = remainder > slice / 2

and thanks for any help

Answer Source

An operator or symbol that tells the compiler to perform specific mathematical or logical manipulations. Takes two parameters first one is greater than second then will return true otherwise false In your case node.hidden = remainder > slice / 2 as it will return the boolean and decide weather the node will be hidden or visible.

Comparison Operators

Swift supports all standard C comparison operators:

  • Equal to (a == b)

  • Not equal to (a != b)

  • Greater than (a > b)
  • Less than (a < b)
  • Greater than or equal to (a >= b)
  • Less than or equal to (a <= b)

Source apple developer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download