Created
April 6, 2014 20:49
-
-
Save davidnormo/10011302 to your computer and use it in GitHub Desktop.
CSS Pixel to Twips Conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pixels to Twips conversion | |
* @param {Int} pixels | |
* @return {Int} | |
* / | |
var pixelsToTwips = function(pixels){ | |
return pixels * 15; | |
}; | |
/** | |
* Twips to Pixels conversion | |
* @param {Int} twips | |
* @return {Int} | |
* / | |
var twipsToPixels = function(twips){ | |
return twips / 15; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment