using double instead of float for scalefactor

- In fact, Cocoa(GUI Library of Mac) use type ``double`` for scale factor