Use conditionnal expression operator `?`

. It works as:

condition ? expression-true : expression-false

so for your question:

`func f = ( (x==0.0 && y==0.0) ? 0.0 : ( x^2-y^2 > 0.0 ? x^2/(x^2+y^2) : y^2/(x^2+y^2) ) ); `

Use conditionnal expression operator `?`

. It works as:

condition ? expression-true : expression-false

so for your question:

`func f = ( (x==0.0 && y==0.0) ? 0.0 : ( x^2-y^2 > 0.0 ? x^2/(x^2+y^2) : y^2/(x^2+y^2) ) ); `