vec4-ext.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. #. :c:func:`glm_vec4_isnan`
  21. #. :c:func:`glm_vec4_isinf`
  22. #. :c:func:`glm_vec4_isvalid`
  23. #. :c:func:`glm_vec4_sign`
  24. #. :c:func:`glm_vec4_abs`
  25. #. :c:func:`glm_vec4_fract`
  26. #. :c:func:`glm_vec4_floor`
  27. #. :c:func:`glm_vec4_sqrt`
  28. Functions documentation
  29. ~~~~~~~~~~~~~~~~~~~~~~~
  30. .. c:function:: void glm_vec4_mulv(vec4 a, vec4 b, vec4 d)
  31. multiplies individual items
  32. Parameters:
  33. | *[in]* **a** vec1
  34. | *[in]* **b** vec2
  35. | *[out]* **d** destination
  36. .. c:function:: void glm_vec4_broadcast(float val, vec4 d)
  37. fill a vector with specified value
  38. Parameters:
  39. | *[in]* **val** value
  40. | *[out]* **dest** destination
  41. .. c:function:: bool glm_vec4_eq(vec4 v, float val)
  42. check if vector is equal to value (without epsilon)
  43. Parameters:
  44. | *[in]* **v** vector
  45. | *[in]* **val** value
  46. .. c:function:: bool glm_vec4_eq_eps(vec4 v, float val)
  47. check if vector is equal to value (with epsilon)
  48. Parameters:
  49. | *[in]* **v** vector
  50. | *[in]* **val** value
  51. .. c:function:: bool glm_vec4_eq_all(vec4 v)
  52. check if vectors members are equal (without epsilon)
  53. Parameters:
  54. | *[in]* **v** vector
  55. .. c:function:: bool glm_vec4_eqv(vec4 v1, vec4 v2)
  56. check if vector is equal to another (without epsilon) vector
  57. Parameters:
  58. | *[in]* **vec** vector 1
  59. | *[in]* **vec** vector 2
  60. .. c:function:: bool glm_vec4_eqv_eps(vec4 v1, vec4 v2)
  61. check if vector is equal to another (with epsilon)
  62. Parameters:
  63. | *[in]* **v1** vector1
  64. | *[in]* **v2** vector2
  65. .. c:function:: float glm_vec4_max(vec4 v)
  66. max value of vector
  67. Parameters:
  68. | *[in]* **v** vector
  69. .. c:function:: float glm_vec4_min(vec4 v)
  70. min value of vector
  71. Parameters:
  72. | *[in]* **v** vector
  73. .. c:function:: bool glm_vec4_isnan(vec4 v)
  74. | check if one of items is NaN (not a number)
  75. | you should only use this in DEBUG mode or very critical asserts
  76. Parameters:
  77. | *[in]* **v** vector
  78. .. c:function:: bool glm_vec4_isinf(vec4 v)
  79. | check if one of items is INFINITY
  80. | you should only use this in DEBUG mode or very critical asserts
  81. Parameters:
  82. | *[in]* **v** vector
  83. .. c:function:: bool glm_vec4_isvalid(vec4 v)
  84. | check if all items are valid number
  85. | you should only use this in DEBUG mode or very critical asserts
  86. Parameters:
  87. | *[in]* **v** vector
  88. .. c:function:: void glm_vec4_sign(vec4 v, vec4 dest)
  89. get sign of 32 bit float as +1, -1, 0
  90. Parameters:
  91. | *[in]* **v** vector
  92. | *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
  93. .. c:function:: void glm_vec4_abs(vec4 v, vec4 dest)
  94. absolute value of each vector item
  95. Parameters:
  96. | *[in]* **v** vector
  97. | *[out]* **dest** destination vector (abs(v))
  98. .. c:function:: void glm_vec4_fract(vec4 v, vec4 dest)
  99. fractional part of each vector item
  100. Parameters:
  101. | *[in]* **v** vector
  102. | *[out]* **dest** destination vector (fract(v))
  103. .. c:function:: void glm_vec4_floor(vec4 v, vec4 dest)
  104. floor of each vector item
  105. Parameters:
  106. | *[in]* **v** vector
  107. | *[out]* **dest** destination vector (floor(v))
  108. .. c:function:: void glm_vec4_sqrt(vec4 v, vec4 dest)
  109. square root of each vector item
  110. Parameters:
  111. | *[in]* **v** vector
  112. | *[out]* **dest** destination vector (sqrt(v))