in reply to [OT] Mysterious function. (Updated)

My _guess_ is that it's working out where to put the graduations when drawing a graph.

i.e. when the graphed interval is 1 year put tick marks every 1 month, 2 years - ticks every 2 months, .. 500 years - ticks every 50 years. There is some obvious repetition -- you could scale some of the results, as the answer for (100 - 1000) is ten times as big as that for (10 - 100). HTH

  • Comment on Re: [OT] Mysterious function. (Updated)

Replies are listed 'Best First'.
Re^2: [OT] Mysterious function. (Updated)
by BrowserUk (Patriarch) on Apr 23, 2015 at 18:30 UTC

    Thank you! Now you've pointed it out, it makes a lot of sense in isolation.

    In the actual example it appears to be called for all three axis, only one of which is date related.

    But then there is some conditional code that is rather opaque; so it might be that it is only used by the months axis.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked