Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. private static double ApplyGamma(double v)
  2. {
  3. if (v <= 0.0031308)
  4. return Cut(v * 12.92);
  5.  
  6. return Cut(1.055 * Math.Pow(v, (1.0 / 2.4)) - 0.055);
  7. }
  8.  
  9. private static double ApplyInverseGamma(double v)
  10. {
  11. if (v <= 0.04045)
  12. return v / 12.92;
  13.  
  14. return Math.Pow((v + 0.055) / 1.055, 2.4);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement