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
# ... | |
desc "Deploy website to s3/cloudfront via aws-sdk" | |
task :s3_cloudfront => [:generate, :minify, :gzip, :compress_images] do | |
puts "==================================================" | |
puts " Deploying to Amazon S3 & CloudFront" | |
puts "==================================================" | |
# setup the aws_deploy_tools object | |
config = YAML::load( File.open("_config.yml")) |
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
/* | |
These are the helper functions to store and to restore a 2D vector with a custom 16 floating point precision in a texture. | |
The 16 bit are used as follows: 1 bit is for the sign, 4 bits are used for the exponent, the remaining 11 bit are for the mantissa. | |
The exponent bias is asymmetric so that the maximum representable number is 2047 (and bigger numbers will be cut) | |
the accuracy from 1024 - 2047 is one integer | |
512-1023 it's 1/2 int | |
256-511 it's 1/4 int and so forth... | |
between 0 and 1/16 the accuracy is the highest with 1/2048 (which makes 1/32768 the minimum representable number) |