isEmpty.glsl 550 B

12345678910111213141516171819
  1. /**
  2. * Determines if a time interval is empty.
  3. *
  4. * @name czm_isEmpty
  5. * @glslFunction
  6. *
  7. * @param {czm_raySegment} interval The interval to test.
  8. *
  9. * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
  10. *
  11. * @example
  12. * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
  13. * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
  14. * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
  15. */
  16. bool czm_isEmpty(czm_raySegment interval)
  17. {
  18. return (interval.stop < 0.0);
  19. }