1

Can someone explain me what is happening here?

enter image description here

1
  • 1
    Don't put images of code/results in your question. It's impossible to copy or index properly in search engines. Commented Dec 4, 2018 at 12:59

1 Answer 1

9

In the first case, you call method ceil with an argument, which is -200, it's equivalent to:

(expression).ceil(-200)

The optional argument passed into ceil is responsible for precision.

In the second, you call ceil without any arguments and substract 200 from its result, i.e. you call method - with argument 200 on its result, so it's equivalent to:

(expression).ceil.-(200)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.