round.js 647 B

123456789101112131415161718192021222324
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "/**\n\
  3. * Round a floating point value. This function exists because round() doesn't\n\
  4. * exist in GLSL 1.00. \n\
  5. *\n\
  6. * @param {float|vec2|vec3|vec4} value The value to round\n\
  7. * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.\n\
  8. */\n\
  9. float czm_round(float value) {\n\
  10. return floor(value + 0.5);\n\
  11. }\n\
  12. \n\
  13. vec2 czm_round(vec2 value) {\n\
  14. return floor(value + 0.5);\n\
  15. }\n\
  16. \n\
  17. vec3 czm_round(vec3 value) {\n\
  18. return floor(value + 0.5);\n\
  19. }\n\
  20. \n\
  21. vec4 czm_round(vec4 value) {\n\
  22. return floor(value + 0.5);\n\
  23. }\n\
  24. ";