vec4-ext.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. .. default-domain:: C
  2. vec4 extra
  3. ==========
  4. Header: cglm/vec4-ext.h
  5. There are some functions are in called in extra header. These are called extra
  6. because they are not used like other functions in vec4.h in the future some of
  7. these functions ma be moved to vec4 header.
  8. Table of contents (click to go):
  9. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. Functions:
  11. 1. :c:func:`glm_vec4_mulv`
  12. #. :c:func:`glm_vec4_broadcast`
  13. #. :c:func:`glm_vec4_eq`
  14. #. :c:func:`glm_vec4_eq_eps`
  15. #. :c:func:`glm_vec4_eq_all`
  16. #. :c:func:`glm_vec4_eqv`
  17. #. :c:func:`glm_vec4_eqv_eps`
  18. #. :c:func:`glm_vec4_max`
  19. #. :c:func:`glm_vec4_min`
  20. Functions documentation
  21. ~~~~~~~~~~~~~~~~~~~~~~~
  22. .. c:function:: void glm_vec4_mulv(vec4 a, vec4 b, vec4 d)
  23. multiplies individual items
  24. Parameters:
  25. | *[in]* **a** vec1
  26. | *[in]* **b** vec2
  27. | *[out]* **d** destination
  28. .. c:function:: void glm_vec4_broadcast(float val, vec4 d)
  29. fill a vector with specified value
  30. Parameters:
  31. | *[in]* **val** value
  32. | *[out]* **dest** destination
  33. .. c:function:: bool glm_vec4_eq(vec4 v, float val)
  34. check if vector is equal to value (without epsilon)
  35. Parameters:
  36. | *[in]* **v** vector
  37. | *[in]* **val** value
  38. .. c:function:: bool glm_vec4_eq_eps(vec4 v, float val)
  39. check if vector is equal to value (with epsilon)
  40. Parameters:
  41. | *[in]* **v** vector
  42. | *[in]* **val** value
  43. .. c:function:: bool glm_vec4_eq_all(vec4 v)
  44. check if vectors members are equal (without epsilon)
  45. Parameters:
  46. | *[in]* **v** vector
  47. .. c:function:: bool glm_vec4_eqv(vec4 v1, vec4 v2)
  48. check if vector is equal to another (without epsilon) vector
  49. Parameters:
  50. | *[in]* **vec** vector 1
  51. | *[in]* **vec** vector 2
  52. .. c:function:: bool glm_vec4_eqv_eps(vec4 v1, vec4 v2)
  53. check if vector is equal to another (with epsilon)
  54. Parameters:
  55. | *[in]* **v1** vector1
  56. | *[in]* **v2** vector2
  57. .. c:function:: float glm_vec4_max(vec4 v)
  58. max value of vector
  59. Parameters:
  60. | *[in]* **v** vector
  61. .. c:function:: float glm_vec4_min(vec4 v)
  62. min value of vector
  63. Parameters:
  64. | *[in]* **v** vector
  65. .. c:function:: bool glm_vec4_isnan(vec4 v)
  66. | check if one of items is NaN (not a number)
  67. | you should only use this in DEBUG mode or very critical asserts
  68. Parameters:
  69. | *[in]* **v** vector
  70. .. c:function:: bool glm_vec4_isinf(vec4 v)
  71. | check if one of items is INFINITY
  72. | you should only use this in DEBUG mode or very critical asserts
  73. Parameters:
  74. | *[in]* **v** vector
  75. .. c:function:: bool glm_vec4_isvalid(vec4 v)
  76. | check if all items are valid number
  77. | you should only use this in DEBUG mode or very critical asserts
  78. Parameters:
  79. | *[in]* **v** vector
  80. .. c:function:: void glm_vec4_sign(vec4 v, vec4 dest)
  81. get sign of 32 bit float as +1, -1, 0
  82. Parameters:
  83. | *[in]* **v** vector
  84. | *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
  85. .. c:function:: void glm_vec4_sqrt(vec4 v, vec4 dest)
  86. square root of each vector item
  87. Parameters:
  88. | *[in]* **v** vector
  89. | *[out]* **dest** destination vector (sqrt(v))