SHARE
TWEET

Untitled

a guest Jun 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2.  
  3.  
  4.  
  5. //#include "../../Engine/Engine.h"
  6. // cmath standard header
  7. #pragma once
  8. #ifndef _CMATH_
  9. #define _CMATH_
  10. #ifndef RC_INVOKED
  11.  
  12. #include <yvals.h>
  13. #include <cstdlib>
  14.  
  15. #pragma pack(push,_CRT_PACKING)
  16. #pragma warning(push,_STL_WARNING_LEVEL)
  17. #pragma warning(disable: _STL_DISABLED_WARNINGS)
  18. _STL_DISABLE_CLANG_WARNINGS
  19. #pragma push_macro("new")
  20. #undef new
  21.  
  22. _Check_return_ inline double pow(_In_ double _Xx, _In_ int _Yx) noexcept
  23. {
  24.     if (_Yx == 2)
  25.         return (_Xx * _Xx);
  26.  
  27.     return (_CSTD pow(_Xx, static_cast<double>(_Yx)));
  28. }
  29.  
  30. _Check_return_ inline float acos(_In_ float _Xx) noexcept
  31. {
  32.     return (_CSTD acosf(_Xx));
  33. }
  34.  
  35. _Check_return_ inline float acosh(_In_ float _Xx) noexcept
  36. {
  37.     return (_CSTD acoshf(_Xx));
  38. }
  39.  
  40. _Check_return_ inline float asin(_In_ float _Xx) noexcept
  41. {
  42.     return (_CSTD asinf(_Xx));
  43. }
  44.  
  45. _Check_return_ inline float asinh(_In_ float _Xx) noexcept
  46. {
  47.     return (_CSTD asinhf(_Xx));
  48. }
  49.  
  50. _Check_return_ inline float atan(_In_ float _Xx) noexcept
  51. {
  52.     return (_CSTD atanf(_Xx));
  53. }
  54.  
  55. _Check_return_ inline float atanh(_In_ float _Xx) noexcept
  56. {
  57.     return (_CSTD atanhf(_Xx));
  58. }
  59.  
  60. _Check_return_ inline float atan2(_In_ float _Yx, _In_ float _Xx) noexcept
  61. {
  62.     return (_CSTD atan2f(_Yx, _Xx));
  63. }
  64.  
  65. _Check_return_ inline float cbrt(_In_ float _Xx) noexcept
  66. {
  67.     return (_CSTD cbrtf(_Xx));
  68. }
  69.  
  70. _Check_return_ inline float ceil(_In_ float _Xx) noexcept
  71. {
  72.     return (_CSTD ceilf(_Xx));
  73. }
  74.  
  75. _Check_return_ inline float copysign(_In_ float _Number,
  76.     _In_ float _Sign) noexcept
  77. {
  78.     return (_CSTD copysignf(_Number, _Sign));
  79. }
  80.  
  81. _Check_return_ inline float cos(_In_ float _Xx) noexcept
  82. {
  83.     return (_CSTD cosf(_Xx));
  84. }
  85.  
  86. _Check_return_ inline float cosh(_In_ float _Xx) noexcept
  87. {
  88.     return (_CSTD coshf(_Xx));
  89. }
  90.  
  91. _Check_return_ inline float erf(_In_ float _Xx) noexcept
  92. {
  93.     return (_CSTD erff(_Xx));
  94. }
  95.  
  96. _Check_return_ inline float erfc(_In_ float _Xx) noexcept
  97. {
  98.     return (_CSTD erfcf(_Xx));
  99. }
  100.  
  101. _Check_return_ inline float exp(_In_ float _Xx) noexcept
  102. {
  103.     return (_CSTD expf(_Xx));
  104. }
  105.  
  106. _Check_return_ inline float exp2(_In_ float _Xx) noexcept
  107. {
  108.     return (_CSTD exp2f(_Xx));
  109. }
  110.  
  111. _Check_return_ inline float expm1(_In_ float _Xx) noexcept
  112. {
  113.     return (_CSTD expm1f(_Xx));
  114. }
  115.  
  116. _Check_return_ inline float fabs(_In_ float _Xx) noexcept
  117. {
  118.     return (_CSTD fabsf(_Xx));
  119. }
  120.  
  121. _Check_return_ inline float fdim(_In_ float _Xx, _In_ float _Yx) noexcept
  122. {
  123.     return (_CSTD fdimf(_Xx, _Yx));
  124. }
  125.  
  126. _Check_return_ inline float floor(_In_ float _Xx) noexcept
  127. {
  128.     return (_CSTD floorf(_Xx));
  129. }
  130.  
  131. _Check_return_ inline float fma(_In_ float _Xx, _In_ float _Yx,
  132.     _In_ float _Zx) noexcept
  133. {
  134.     return (_CSTD fmaf(_Xx, _Yx, _Zx));
  135. }
  136.  
  137. _Check_return_ inline float fmax(_In_ float _Xx, _In_ float _Yx) noexcept
  138. {
  139.     return (_CSTD fmaxf(_Xx, _Yx));
  140. }
  141.  
  142. _Check_return_ inline float fmin(_In_ float _Xx, _In_ float _Yx) noexcept
  143. {
  144.     return (_CSTD fminf(_Xx, _Yx));
  145. }
  146.  
  147. _Check_return_ inline float fmod(_In_ float _Xx, _In_ float _Yx) noexcept
  148. {
  149.     return (_CSTD fmodf(_Xx, _Yx));
  150. }
  151.  
  152. _Check_return_ inline float frexp(_In_ float _Xx, _Out_ int* _Yx) noexcept
  153. {
  154.     return (_CSTD frexpf(_Xx, _Yx));
  155. }
  156.  
  157. _Check_return_ inline float hypot(_In_ float _Xx, _In_ float _Yx) noexcept
  158. {
  159.     return (_CSTD hypotf(_Xx, _Yx));
  160. }
  161.  
  162. _Check_return_ inline int ilogb(_In_ float _Xx) noexcept
  163. {
  164.     return (_CSTD ilogbf(_Xx));
  165. }
  166.  
  167. _Check_return_ inline float ldexp(_In_ float _Xx, _In_ int _Yx) noexcept
  168. {
  169.     return (_CSTD ldexpf(_Xx, _Yx));
  170. }
  171.  
  172. _Check_return_ inline float lgamma(_In_ float _Xx) noexcept
  173. {
  174.     return (_CSTD lgammaf(_Xx));
  175. }
  176.  
  177. _Check_return_ inline long long llrint(_In_ float _Xx) noexcept
  178. {
  179.     return (_CSTD llrintf(_Xx));
  180. }
  181.  
  182. _Check_return_ inline long long llround(_In_ float _Xx) noexcept
  183. {
  184.     return (_CSTD llroundf(_Xx));
  185. }
  186.  
  187. _Check_return_ inline float log(_In_ float _Xx) noexcept
  188. {
  189.     return (_CSTD logf(_Xx));
  190. }
  191.  
  192. _Check_return_ inline float log10(_In_ float _Xx) noexcept
  193. {
  194.     return (_CSTD log10f(_Xx));
  195. }
  196.  
  197. _Check_return_ inline float log1p(_In_ float _Xx) noexcept
  198. {
  199.     return (_CSTD log1pf(_Xx));
  200. }
  201.  
  202. _Check_return_ inline float log2(_In_ float _Xx) noexcept
  203. {
  204.     return (_CSTD log2f(_Xx));
  205. }
  206.  
  207. _Check_return_ inline float logb(_In_ float _Xx) noexcept
  208. {
  209.     return (_CSTD logbf(_Xx));
  210. }
  211.  
  212. _Check_return_ inline long lrint(_In_ float _Xx) noexcept
  213. {
  214.     return (_CSTD lrintf(_Xx));
  215. }
  216.  
  217. _Check_return_ inline long lround(_In_ float _Xx) noexcept
  218. {
  219.     return (_CSTD lroundf(_Xx));
  220. }
  221.  
  222. _Check_return_ inline float modf(_In_ float _Xx, _Out_ float* _Yx) noexcept
  223. {
  224.     return (_CSTD modff(_Xx, _Yx));
  225. }
  226.  
  227. _Check_return_ inline float nearbyint(_In_ float _Xx) noexcept
  228. {
  229.     return (_CSTD nearbyintf(_Xx));
  230. }
  231.  
  232. _Check_return_ inline float nextafter(_In_ float _Xx, _In_ float _Yx) noexcept
  233. {
  234.     return (_CSTD nextafterf(_Xx, _Yx));
  235. }
  236.  
  237. _Check_return_ inline float nexttoward(_In_ float _Xx,
  238.     _In_ long double _Yx) noexcept
  239. {
  240.     return (_CSTD nexttowardf(_Xx, _Yx));
  241. }
  242.  
  243. _Check_return_ inline float pow(_In_ float _Xx,
  244.     _In_ float _Yx) noexcept
  245. {
  246.     return (_CSTD powf(_Xx, _Yx));
  247. }
  248.  
  249. _Check_return_ inline float pow(_In_ float _Xx, _In_ int _Yx) noexcept
  250. {
  251.     if (_Yx == 2)
  252.         return (_Xx * _Xx);
  253.  
  254.     return (_CSTD powf(_Xx, static_cast<float>(_Yx)));
  255. }
  256.  
  257. _Check_return_ inline float remainder(_In_ float _Xx, _In_ float _Yx) noexcept
  258. {
  259.     return (_CSTD remainderf(_Xx, _Yx));
  260. }
  261.  
  262. _Check_return_ inline float remquo(_In_ float _Xx, _In_ float _Yx,
  263.     _Out_ int *_Zx) noexcept
  264. {
  265.     return (_CSTD remquof(_Xx, _Yx, _Zx));
  266. }
  267.  
  268. _Check_return_ inline float rint(_In_ float _Xx) noexcept
  269. {
  270.     return (_CSTD rintf(_Xx));
  271. }
  272.  
  273. _Check_return_ inline float round(_In_ float _Xx) noexcept
  274. {
  275.     return (_CSTD roundf(_Xx));
  276. }
  277.  
  278. _Check_return_ inline float scalbln(_In_ float _Xx, _In_ long _Yx) noexcept
  279. {
  280.     return (_CSTD scalblnf(_Xx, _Yx));
  281. }
  282.  
  283. _Check_return_ inline float scalbn(_In_ float _Xx, _In_ int _Yx) noexcept
  284. {
  285.     return (_CSTD scalbnf(_Xx, _Yx));
  286. }
  287.  
  288. _Check_return_ inline float sin(_In_ float _Xx) noexcept
  289. {
  290.     return (_CSTD sinf(_Xx));
  291. }
  292.  
  293. _Check_return_ inline float sinh(_In_ float _Xx) noexcept
  294. {
  295.     return (_CSTD sinhf(_Xx));
  296. }
  297.  
  298. _Check_return_ inline float sqrt(_In_ float _Xx) noexcept
  299. {
  300.     return (_CSTD sqrtf(_Xx));
  301. }
  302.  
  303. _Check_return_ inline float tan(_In_ float _Xx) noexcept
  304. {
  305.     return (_CSTD tanf(_Xx));
  306. }
  307.  
  308. _Check_return_ inline float tanh(_In_ float _Xx) noexcept
  309. {
  310.     return (_CSTD tanhf(_Xx));
  311. }
  312.  
  313. _Check_return_ inline float tgamma(_In_ float _Xx) noexcept
  314. {
  315.     return (_CSTD tgammaf(_Xx));
  316. }
  317.  
  318. _Check_return_ inline float trunc(_In_ float _Xx) noexcept
  319. {
  320.     return (_CSTD truncf(_Xx));
  321. }
  322.  
  323. _Check_return_ inline long double acos(_In_ long double _Xx) noexcept
  324. {
  325.     return (_CSTD acosl(_Xx));
  326. }
  327.  
  328. _Check_return_ inline long double acosh(_In_ long double _Xx) noexcept
  329. {
  330.     return (_CSTD acoshl(_Xx));
  331. }
  332.  
  333. _Check_return_ inline long double asin(_In_ long double _Xx) noexcept
  334. {
  335.     return (_CSTD asinl(_Xx));
  336. }
  337.  
  338. _Check_return_ inline long double asinh(_In_ long double _Xx) noexcept
  339. {
  340.     return (_CSTD asinhl(_Xx));
  341. }
  342.  
  343. _Check_return_ inline long double atan(_In_ long double _Xx) noexcept
  344. {
  345.     return (_CSTD atanl(_Xx));
  346. }
  347.  
  348. _Check_return_ inline long double atanh(_In_ long double _Xx) noexcept
  349. {
  350.     return (_CSTD atanhl(_Xx));
  351. }
  352.  
  353. _Check_return_ inline long double atan2(_In_ long double _Yx,
  354.     _In_ long double _Xx) noexcept
  355. {
  356.     return (_CSTD atan2l(_Yx, _Xx));
  357. }
  358.  
  359. _Check_return_ inline long double cbrt(_In_ long double _Xx) noexcept
  360. {
  361.     return (_CSTD cbrtl(_Xx));
  362. }
  363.  
  364. _Check_return_ inline long double ceil(_In_ long double _Xx) noexcept
  365. {
  366.     return (_CSTD ceill(_Xx));
  367. }
  368.  
  369. _Check_return_ inline long double copysign(_In_ long double _Number,
  370.     _In_ long double _Sign) noexcept
  371. {
  372.     return (_CSTD copysignl(_Number, _Sign));
  373. }
  374.  
  375. _Check_return_ inline long double cos(_In_ long double _Xx) noexcept
  376. {
  377.     return (_CSTD cosl(_Xx));
  378. }
  379.  
  380. _Check_return_ inline long double cosh(_In_ long double _Xx) noexcept
  381. {
  382.     return (_CSTD coshl(_Xx));
  383. }
  384.  
  385. _Check_return_ inline long double erf(_In_ long double _Xx) noexcept
  386. {
  387.     return (_CSTD erfl(_Xx));
  388. }
  389.  
  390. _Check_return_ inline long double erfc(_In_ long double _Xx) noexcept
  391. {
  392.     return (_CSTD erfcl(_Xx));
  393. }
  394.  
  395. _Check_return_ inline long double exp(_In_ long double _Xx) noexcept
  396. {
  397.     return (_CSTD expl(_Xx));
  398. }
  399.  
  400. _Check_return_ inline long double exp2(_In_ long double _Xx) noexcept
  401. {
  402.     return (_CSTD exp2l(_Xx));
  403. }
  404.  
  405. _Check_return_ inline long double expm1(_In_ long double _Xx) noexcept
  406. {
  407.     return (_CSTD expm1l(_Xx));
  408. }
  409.  
  410. _Check_return_ inline long double fabs(_In_ long double _Xx) noexcept
  411. {
  412.     return (_CSTD fabsl(_Xx));
  413. }
  414.  
  415. _Check_return_ inline long double fdim(_In_ long double _Xx,
  416.     _In_ long double _Yx) noexcept
  417. {
  418.     return (_CSTD fdiml(_Xx, _Yx));
  419. }
  420.  
  421. _Check_return_ inline long double floor(_In_ long double _Xx) noexcept
  422. {
  423.     return (_CSTD floorl(_Xx));
  424. }
  425.  
  426. _Check_return_ inline long double fma(_In_ long double _Xx,
  427.     _In_ long double _Yx, _In_ long double _Zx) noexcept
  428. {
  429.     return (_CSTD fmal(_Xx, _Yx, _Zx));
  430. }
  431.  
  432. _Check_return_ inline long double fmax(_In_ long double _Xx,
  433.     _In_ long double _Yx) noexcept
  434. {
  435.     return (_CSTD fmaxl(_Xx, _Yx));
  436. }
  437.  
  438. _Check_return_ inline long double fmin(_In_ long double _Xx,
  439.     _In_ long double _Yx) noexcept
  440. {
  441.     return (_CSTD fminl(_Xx, _Yx));
  442. }
  443.  
  444. _Check_return_ inline long double fmod(_In_ long double _Xx,
  445.     _In_ long double _Yx) noexcept
  446. {
  447.     return (_CSTD fmodl(_Xx, _Yx));
  448. }
  449.  
  450. _Check_return_ inline long double frexp(_In_ long double _Xx,
  451.     _Out_ int* _Yx) noexcept
  452. {
  453.     return (_CSTD frexpl(_Xx, _Yx));
  454. }
  455.  
  456. _Check_return_ inline long double hypot(_In_ long double _Xx,
  457.     _In_ long double _Yx) noexcept
  458. {
  459.     return (_CSTD hypotl(_Xx, _Yx));
  460. }
  461.  
  462. _Check_return_ inline int ilogb(_In_ long double _Xx) noexcept
  463. {
  464.     return (_CSTD ilogbl(_Xx));
  465. }
  466.  
  467. _Check_return_ inline long double ldexp(_In_ long double _Xx,
  468.     _In_ int _Yx) noexcept
  469. {
  470.     return (_CSTD ldexpl(_Xx, _Yx));
  471. }
  472.  
  473. _Check_return_ inline long double lgamma(_In_ long double _Xx) noexcept
  474. {
  475.     return (_CSTD lgammal(_Xx));
  476. }
  477.  
  478. _Check_return_ inline long long llrint(_In_ long double _Xx) noexcept
  479. {
  480.     return (_CSTD llrintl(_Xx));
  481. }
  482.  
  483. _Check_return_ inline long long llround(_In_ long double _Xx) noexcept
  484. {
  485.     return (_CSTD llroundl(_Xx));
  486. }
  487.  
  488. _Check_return_ inline long double log(_In_ long double _Xx) noexcept
  489. {
  490.     return (_CSTD logl(_Xx));
  491. }
  492.  
  493. _Check_return_ inline long double log10(_In_ long double _Xx) noexcept
  494. {
  495.     return (_CSTD log10l(_Xx));
  496. }
  497.  
  498. _Check_return_ inline long double log1p(_In_ long double _Xx) noexcept
  499. {
  500.     return (_CSTD log1pl(_Xx));
  501. }
  502.  
  503. _Check_return_ inline long double log2(_In_ long double _Xx) noexcept
  504. {
  505.     return (_CSTD log2l(_Xx));
  506. }
  507.  
  508. _Check_return_ inline long double logb(_In_ long double _Xx) noexcept
  509. {
  510.     return (_CSTD logbl(_Xx));
  511. }
  512.  
  513. _Check_return_ inline long lrint(_In_ long double _Xx) noexcept
  514. {
  515.     return (_CSTD lrintl(_Xx));
  516. }
  517.  
  518. _Check_return_ inline long lround(_In_ long double _Xx) noexcept
  519. {
  520.     return (_CSTD lroundl(_Xx));
  521. }
  522.  
  523. _Check_return_ inline long double modf(_In_ long double _Xx,
  524.     _Out_ long double* _Yx) noexcept
  525. {
  526.     return (_CSTD modfl(_Xx, _Yx));
  527. }
  528.  
  529. _Check_return_ inline long double nearbyint(_In_ long double _Xx) noexcept
  530. {
  531.     return (_CSTD nearbyintl(_Xx));
  532. }
  533.  
  534. _Check_return_ inline long double nextafter(_In_ long double _Xx,
  535.     _In_ long double _Yx) noexcept
  536. {
  537.     return (_CSTD nextafterl(_Xx, _Yx));
  538. }
  539.  
  540. _Check_return_ inline long double nexttoward(_In_ long double _Xx,
  541.     _In_ long double _Yx) noexcept
  542. {
  543.     return (_CSTD nexttowardl(_Xx, _Yx));
  544. }
  545.  
  546. _Check_return_ inline long double pow(_In_ long double _Xx,
  547.     _In_ long double _Yx) noexcept
  548. {
  549.     return (_CSTD powl(_Xx, _Yx));
  550. }
  551.  
  552. _Check_return_ inline long double pow(_In_ long double _Xx,
  553.     _In_ int _Yx) noexcept
  554. {
  555.     if (_Yx == 2)
  556.         return (_Xx * _Xx);
  557.  
  558.     return (_CSTD powl(_Xx, static_cast<long double>(_Yx)));
  559. }
  560.  
  561. _Check_return_ inline long double remainder(_In_ long double _Xx,
  562.     _In_ long double _Yx) noexcept
  563. {
  564.     return (_CSTD remainderl(_Xx, _Yx));
  565. }
  566.  
  567. _Check_return_ inline long double remquo(_In_ long double _Xx,
  568.     _In_ long double _Yx, _Out_ int *_Zx) noexcept
  569. {
  570.     return (_CSTD remquol(_Xx, _Yx, _Zx));
  571. }
  572.  
  573. _Check_return_ inline long double rint(_In_ long double _Xx) noexcept
  574. {
  575.     return (_CSTD rintl(_Xx));
  576. }
  577.  
  578. _Check_return_ inline long double round(_In_ long double _Xx) noexcept
  579. {
  580.     return (_CSTD roundl(_Xx));
  581. }
  582.  
  583. _Check_return_ inline long double scalbln(_In_ long double _Xx,
  584.     _In_ long _Yx) noexcept
  585. {
  586.     return (_CSTD scalblnl(_Xx, _Yx));
  587. }
  588.  
  589. _Check_return_ inline long double scalbn(_In_ long double _Xx,
  590.     _In_ int _Yx) noexcept
  591. {
  592.     return (_CSTD scalbnl(_Xx, _Yx));
  593. }
  594.  
  595. _Check_return_ inline long double sin(_In_ long double _Xx) noexcept
  596. {
  597.     return (_CSTD sinl(_Xx));
  598. }
  599.  
  600. _Check_return_ inline long double sinh(_In_ long double _Xx) noexcept
  601. {
  602.     return (_CSTD sinhl(_Xx));
  603. }
  604.  
  605. _Check_return_ inline long double sqrt(_In_ long double _Xx) noexcept
  606. {
  607.     return (_CSTD sqrtl(_Xx));
  608. }
  609.  
  610. _Check_return_ inline long double tan(_In_ long double _Xx) noexcept
  611. {
  612.     return (_CSTD tanl(_Xx));
  613. }
  614.  
  615. _Check_return_ inline long double tanh(_In_ long double _Xx) noexcept
  616. {
  617.     return (_CSTD tanhl(_Xx));
  618. }
  619.  
  620. _Check_return_ inline long double tgamma(_In_ long double _Xx) noexcept
  621. {
  622.     return (_CSTD tgammal(_Xx));
  623. }
  624.  
  625. _Check_return_ inline long double trunc(_In_ long double _Xx) noexcept
  626. {
  627.     return (_CSTD truncl(_Xx));
  628. }
  629.  
  630. #include <xtgmath.h>
  631.  
  632. _STD_BEGIN
  633. using _CSTD abs; using _CSTD acos; using _CSTD asin;
  634. using _CSTD atan; using _CSTD atan2; using _CSTD ceil;
  635. using _CSTD cos; using _CSTD cosh; using _CSTD exp;
  636. using _CSTD fabs; using _CSTD floor; using _CSTD fmod;
  637. using _CSTD frexp; using _CSTD ldexp; using _CSTD log;
  638. using _CSTD log10; using _CSTD modf; using _CSTD pow;
  639. using _CSTD sin; using _CSTD sinh; using _CSTD sqrt;
  640. using _CSTD tan; using _CSTD tanh;
  641.  
  642. using _CSTD acosf; using _CSTD asinf;
  643. using _CSTD atanf; using _CSTD atan2f; using _CSTD ceilf;
  644. using _CSTD cosf; using _CSTD coshf; using _CSTD expf;
  645. using _CSTD fabsf; using _CSTD floorf; using _CSTD fmodf;
  646. using _CSTD frexpf; using _CSTD ldexpf; using _CSTD logf;
  647. using _CSTD log10f; using _CSTD modff; using _CSTD powf;
  648. using _CSTD sinf; using _CSTD sinhf; using _CSTD sqrtf;
  649. using _CSTD tanf; using _CSTD tanhf;
  650.  
  651. using _CSTD acosl; using _CSTD asinl;
  652. using _CSTD atanl; using _CSTD atan2l; using _CSTD ceill;
  653. using _CSTD cosl; using _CSTD coshl; using _CSTD expl;
  654. using _CSTD fabsl; using _CSTD floorl; using _CSTD fmodl;
  655. using _CSTD frexpl; using _CSTD ldexpl; using _CSTD logl;
  656. using _CSTD log10l; using _CSTD modfl; using _CSTD powl;
  657. using _CSTD sinl; using _CSTD sinhl; using _CSTD sqrtl;
  658. using _CSTD tanl; using _CSTD tanhl;
  659.  
  660. using _CSTD float_t; using _CSTD double_t;
  661.  
  662. using _CSTD acosh; using _CSTD asinh; using _CSTD atanh;
  663. using _CSTD cbrt; using _CSTD erf; using _CSTD erfc;
  664. using _CSTD expm1; using _CSTD exp2;
  665. using _CSTD hypot; using _CSTD ilogb; using _CSTD lgamma;
  666. using _CSTD log1p; using _CSTD log2; using _CSTD logb;
  667. using _CSTD llrint; using _CSTD lrint; using _CSTD nearbyint;
  668. using _CSTD rint; using _CSTD llround; using _CSTD lround;
  669. using _CSTD fdim; using _CSTD fma; using _CSTD fmax; using _CSTD fmin;
  670. using _CSTD round; using _CSTD trunc;
  671. using _CSTD remainder; using _CSTD remquo;
  672. using _CSTD copysign; using _CSTD nan; using _CSTD nextafter;
  673. using _CSTD scalbn; using _CSTD scalbln;
  674. using _CSTD nexttoward; using _CSTD tgamma;
  675.  
  676. using _CSTD acoshf; using _CSTD asinhf; using _CSTD atanhf;
  677. using _CSTD cbrtf; using _CSTD erff; using _CSTD erfcf;
  678. using _CSTD expm1f; using _CSTD exp2f;
  679. using _CSTD hypotf; using _CSTD ilogbf; using _CSTD lgammaf;
  680. using _CSTD log1pf; using _CSTD log2f; using _CSTD logbf;
  681. using _CSTD llrintf; using _CSTD lrintf; using _CSTD nearbyintf;
  682. using _CSTD rintf; using _CSTD llroundf; using _CSTD lroundf;
  683. using _CSTD fdimf; using _CSTD fmaf; using _CSTD fmaxf; using _CSTD fminf;
  684. using _CSTD roundf; using _CSTD truncf;
  685. using _CSTD remainderf; using _CSTD remquof;
  686. using _CSTD copysignf; using _CSTD nanf;
  687. using _CSTD nextafterf; using _CSTD scalbnf; using _CSTD scalblnf;
  688. using _CSTD nexttowardf; using _CSTD tgammaf;
  689.  
  690. using _CSTD acoshl; using _CSTD asinhl; using _CSTD atanhl;
  691. using _CSTD cbrtl; using _CSTD erfl; using _CSTD erfcl;
  692. using _CSTD expm1l; using _CSTD exp2l;
  693. using _CSTD hypotl; using _CSTD ilogbl; using _CSTD lgammal;
  694. using _CSTD log1pl; using _CSTD log2l; using _CSTD logbl;
  695. using _CSTD llrintl; using _CSTD lrintl; using _CSTD nearbyintl;
  696. using _CSTD rintl; using _CSTD llroundl; using _CSTD lroundl;
  697. using _CSTD fdiml; using _CSTD fmal; using _CSTD fmaxl; using _CSTD fminl;
  698. using _CSTD roundl; using _CSTD truncl;
  699. using _CSTD remainderl; using _CSTD remquol;
  700. using _CSTD copysignl; using _CSTD nanl;
  701. using _CSTD nextafterl; using _CSTD scalbnl; using _CSTD scalblnl;
  702. using _CSTD nexttowardl; using _CSTD tgammal;
  703.  
  704. using _CSTD fpclassify; using _CSTD signbit;
  705. using _CSTD isfinite; using _CSTD isinf;
  706. using _CSTD isnan; using _CSTD isnormal;
  707. using _CSTD isgreater; using _CSTD isgreaterequal;
  708. using _CSTD isless; using _CSTD islessequal;
  709. using _CSTD islessgreater; using _CSTD isunordered;
  710. _STD_END
  711.  
  712. #if _HAS_CXX17
  713. _EXTERN_C
  714. _CRTIMP4 _NODISCARD double __stdcall __std_smf_assoc_laguerre(unsigned int, unsigned int, double) noexcept;
  715. _CRTIMP4 _NODISCARD float __stdcall __std_smf_assoc_laguerref(unsigned int, unsigned int, float) noexcept;
  716. _CRTIMP4 _NODISCARD double __stdcall __std_smf_assoc_legendre(unsigned int, unsigned int, double) noexcept;
  717. _CRTIMP4 _NODISCARD float __stdcall __std_smf_assoc_legendref(unsigned int, unsigned int, float) noexcept;
  718. _CRTIMP4 _NODISCARD double __stdcall __std_smf_beta(double, double) noexcept;
  719. _CRTIMP4 _NODISCARD float __stdcall __std_smf_betaf(float, float) noexcept;
  720. _CRTIMP4 _NODISCARD double __stdcall __std_smf_comp_ellint_1(double) noexcept;
  721. _CRTIMP4 _NODISCARD float __stdcall __std_smf_comp_ellint_1f(float) noexcept;
  722. _CRTIMP4 _NODISCARD double __stdcall __std_smf_comp_ellint_2(double) noexcept;
  723. _CRTIMP4 _NODISCARD float __stdcall __std_smf_comp_ellint_2f(float) noexcept;
  724. _CRTIMP4 _NODISCARD double __stdcall __std_smf_comp_ellint_3(double, double) noexcept;
  725. _CRTIMP4 _NODISCARD float __stdcall __std_smf_comp_ellint_3f(float, float) noexcept;
  726. _CRTIMP4 _NODISCARD double __stdcall __std_smf_cyl_bessel_i(double, double) noexcept;
  727. _CRTIMP4 _NODISCARD float __stdcall __std_smf_cyl_bessel_if(float, float) noexcept;
  728. _CRTIMP4 _NODISCARD double __stdcall __std_smf_cyl_bessel_j(double, double) noexcept;
  729. _CRTIMP4 _NODISCARD float __stdcall __std_smf_cyl_bessel_jf(float, float) noexcept;
  730. _CRTIMP4 _NODISCARD double __stdcall __std_smf_cyl_bessel_k(double, double) noexcept;
  731. _CRTIMP4 _NODISCARD float __stdcall __std_smf_cyl_bessel_kf(float, float) noexcept;
  732. _CRTIMP4 _NODISCARD double __stdcall __std_smf_cyl_neumann(double, double) noexcept;
  733. _CRTIMP4 _NODISCARD float __stdcall __std_smf_cyl_neumannf(float, float) noexcept;
  734. _CRTIMP4 _NODISCARD double __stdcall __std_smf_ellint_1(double, double) noexcept;
  735. _CRTIMP4 _NODISCARD float __stdcall __std_smf_ellint_1f(float, float) noexcept;
  736. _CRTIMP4 _NODISCARD double __stdcall __std_smf_ellint_2(double, double) noexcept;
  737. _CRTIMP4 _NODISCARD float __stdcall __std_smf_ellint_2f(float, float) noexcept;
  738. _CRTIMP4 _NODISCARD double __stdcall __std_smf_ellint_3(double, double, double) noexcept;
  739. _CRTIMP4 _NODISCARD float __stdcall __std_smf_ellint_3f(float, float, float) noexcept;
  740. _CRTIMP4 _NODISCARD double __stdcall __std_smf_expint(double) noexcept;
  741. _CRTIMP4 _NODISCARD float __stdcall __std_smf_expintf(float) noexcept;
  742. _CRTIMP4 _NODISCARD double __stdcall __std_smf_hermite(unsigned int, double) noexcept;
  743. _CRTIMP4 _NODISCARD float __stdcall __std_smf_hermitef(unsigned int, float) noexcept;
  744. _CRTIMP4 _NODISCARD double __stdcall __std_smf_laguerre(unsigned int, double) noexcept;
  745. _CRTIMP4 _NODISCARD float __stdcall __std_smf_laguerref(unsigned int, float) noexcept;
  746. _CRTIMP4 _NODISCARD double __stdcall __std_smf_legendre(unsigned int, double) noexcept;
  747. _CRTIMP4 _NODISCARD float __stdcall __std_smf_legendref(unsigned int, float) noexcept;
  748. _CRTIMP4 _NODISCARD double __stdcall __std_smf_riemann_zeta(double) noexcept;
  749. _CRTIMP4 _NODISCARD float __stdcall __std_smf_riemann_zetaf(float) noexcept;
  750. _CRTIMP4 _NODISCARD double __stdcall __std_smf_sph_bessel(unsigned int, double) noexcept;
  751. _CRTIMP4 _NODISCARD float __stdcall __std_smf_sph_besself(unsigned int, float) noexcept;
  752. _CRTIMP4 _NODISCARD double __stdcall __std_smf_sph_legendre(unsigned int, unsigned int, double) noexcept;
  753. _CRTIMP4 _NODISCARD float __stdcall __std_smf_sph_legendref(unsigned int, unsigned int, float) noexcept;
  754. _CRTIMP4 _NODISCARD double __stdcall __std_smf_sph_neumann(unsigned int, double) noexcept;
  755. _CRTIMP4 _NODISCARD float __stdcall __std_smf_sph_neumannf(unsigned int, float) noexcept;
  756. _CRTIMP4 _NODISCARD double __stdcall __std_smf_hypot3(double, double, double) noexcept;
  757. _CRTIMP4 _NODISCARD float __stdcall __std_smf_hypot3f(float, float, float) noexcept;
  758. _END_EXTERN_C
  759.  
  760. _STD_BEGIN
  761. #if _HAS_SPECIAL_MATH
  762. // FUNCTION assoc_laguerre
  763. _NODISCARD inline double assoc_laguerre(const unsigned int _Degree, const unsigned int _Order,
  764.     const double _Value)
  765. {
  766.     return (__std_smf_assoc_laguerre(_Degree, _Order, _Value));
  767. }
  768.  
  769. // FUNCTION assoc_laguerref
  770. _NODISCARD inline float assoc_laguerref(const unsigned int _Degree, const unsigned int _Order,
  771.     const float _Value)
  772. {
  773.     return (__std_smf_assoc_laguerref(_Degree, _Order, _Value));
  774. }
  775.  
  776. // FUNCTION assoc_laguerrel
  777. _NODISCARD inline long double assoc_laguerrel(const unsigned int _Degree, const unsigned int _Order,
  778.     const long double _Value)
  779. {
  780.     return (__std_smf_assoc_laguerre(_Degree, _Order, static_cast<double>(_Value)));
  781. }
  782.  
  783. // FUNCTION assoc_legendre
  784. _NODISCARD inline double assoc_legendre(const unsigned int _Degree, const unsigned int _Order,
  785.     const double _Value)
  786. {
  787.     return (__std_smf_assoc_legendre(_Degree, _Order, _Value));
  788. }
  789.  
  790. // FUNCTION assoc_legendref
  791. _NODISCARD inline float assoc_legendref(const unsigned int _Degree, const unsigned int _Order,
  792.     const float _Value)
  793. {
  794.     return (__std_smf_assoc_legendref(_Degree, _Order, _Value));
  795. }
  796.  
  797. // FUNCTION assoc_legendrel
  798. _NODISCARD inline long double assoc_legendrel(const unsigned int _Degree, const unsigned int _Order,
  799.     const long double _Value)
  800. {
  801.     return (__std_smf_assoc_legendre(_Degree, _Order, static_cast<double>(_Value)));
  802. }
  803.  
  804. // FUNCTION beta
  805. _NODISCARD inline double beta(const double _Arg1, const double _Arg2)
  806. {
  807.     return (__std_smf_beta(_Arg1, _Arg2));
  808. }
  809.  
  810. // FUNCTION betaf
  811. _NODISCARD inline float betaf(const float _Arg1, const float _Arg2)
  812. {
  813.     return (__std_smf_betaf(_Arg1, _Arg2));
  814. }
  815.  
  816. // FUNCTION betal
  817. _NODISCARD inline long double betal(const long double _Arg1, const long double _Arg2)
  818. {
  819.     return (__std_smf_beta(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  820. }
  821.  
  822. // FUNCTION comp_ellint_1
  823. _NODISCARD inline double comp_ellint_1(const double _Arg)
  824. {
  825.     return (__std_smf_comp_ellint_1(_Arg));
  826. }
  827.  
  828. // FUNCTION comp_ellint_1f
  829. _NODISCARD inline float comp_ellint_1f(const float _Arg)
  830. {
  831.     return (__std_smf_comp_ellint_1f(_Arg));
  832. }
  833.  
  834. // FUNCTION comp_ellint_1l
  835. _NODISCARD inline long double comp_ellint_1l(const long double _Arg)
  836. {
  837.     return (__std_smf_comp_ellint_1(static_cast<double>(_Arg)));
  838. }
  839.  
  840. // FUNCTION comp_ellint_2
  841. _NODISCARD inline double comp_ellint_2(const double _Arg)
  842. {
  843.     return (__std_smf_comp_ellint_2(_Arg));
  844. }
  845.  
  846. // FUNCTION comp_ellint_2f
  847. _NODISCARD inline float comp_ellint_2f(const float _Arg)
  848. {
  849.     return (__std_smf_comp_ellint_2f(_Arg));
  850. }
  851.  
  852. // FUNCTION comp_ellint_2l
  853. _NODISCARD inline long double comp_ellint_2l(const long double _Arg)
  854. {
  855.     return (__std_smf_comp_ellint_2(static_cast<double>(_Arg)));
  856. }
  857.  
  858. // FUNCTION comp_ellint_3
  859. _NODISCARD inline double comp_ellint_3(const double _Arg1, const double _Arg2)
  860. {
  861.     return (__std_smf_comp_ellint_3(_Arg1, _Arg2));
  862. }
  863.  
  864. // FUNCTION comp_ellint_3f
  865. _NODISCARD inline float comp_ellint_3f(const float _Arg1, const float _Arg2)
  866. {
  867.     return (__std_smf_comp_ellint_3f(_Arg1, _Arg2));
  868. }
  869.  
  870. // FUNCTION comp_ellint_3l
  871. _NODISCARD inline long double comp_ellint_3l(const long double _Arg1, const long double _Arg2)
  872. {
  873.     return (__std_smf_comp_ellint_3(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  874. }
  875.  
  876. // FUNCTION cyl_bessel_i
  877. _NODISCARD inline double cyl_bessel_i(const double _Arg1, const double _Arg2)
  878. {
  879.     return (__std_smf_cyl_bessel_i(_Arg1, _Arg2));
  880. }
  881.  
  882. // FUNCTION cyl_bessel_if
  883. _NODISCARD inline float cyl_bessel_if(const float _Arg1, const float _Arg2)
  884. {
  885.     return (__std_smf_cyl_bessel_if(_Arg1, _Arg2));
  886. }
  887.  
  888. // FUNCTION cyl_bessel_il
  889. _NODISCARD inline long double cyl_bessel_il(const long double _Arg1, const long double _Arg2)
  890. {
  891.     return (__std_smf_cyl_bessel_i(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  892. }
  893.  
  894. // FUNCTION cyl_bessel_j
  895. _NODISCARD inline double cyl_bessel_j(const double _Arg1, const double _Arg2)
  896. {
  897.     return (__std_smf_cyl_bessel_j(_Arg1, _Arg2));
  898. }
  899.  
  900. // FUNCTION cyl_bessel_jf
  901. _NODISCARD inline float cyl_bessel_jf(const float _Arg1, const float _Arg2)
  902. {
  903.     return (__std_smf_cyl_bessel_jf(_Arg1, _Arg2));
  904. }
  905.  
  906. // FUNCTION cyl_bessel_jl
  907. _NODISCARD inline long double cyl_bessel_jl(const long double _Arg1, const long double _Arg2)
  908. {
  909.     return (__std_smf_cyl_bessel_j(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  910. }
  911.  
  912. // FUNCTION cyl_bessel_k
  913. _NODISCARD inline double cyl_bessel_k(const double _Arg1, const double _Arg2)
  914. {
  915.     return (__std_smf_cyl_bessel_k(_Arg1, _Arg2));
  916. }
  917.  
  918. // FUNCTION cyl_bessel_kf
  919. _NODISCARD inline float cyl_bessel_kf(const float _Arg1, const float _Arg2)
  920. {
  921.     return (__std_smf_cyl_bessel_kf(_Arg1, _Arg2));
  922. }
  923.  
  924. // FUNCTION cyl_bessel_kl
  925. _NODISCARD inline long double cyl_bessel_kl(const long double _Arg1, const long double _Arg2)
  926. {
  927.     return (__std_smf_cyl_bessel_k(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  928. }
  929.  
  930. // FUNCTION cyl_neumann
  931. _NODISCARD inline double cyl_neumann(const double _Arg1, const double _Arg2)
  932. {
  933.     return (__std_smf_cyl_neumann(_Arg1, _Arg2));
  934. }
  935.  
  936. // FUNCTION cyl_neumannf
  937. _NODISCARD inline float cyl_neumannf(const float _Arg1, const float _Arg2)
  938. {
  939.     return (__std_smf_cyl_neumannf(_Arg1, _Arg2));
  940. }
  941.  
  942. // FUNCTION cyl_neumannl
  943. _NODISCARD inline long double cyl_neumannl(const long double _Arg1, const long double _Arg2)
  944. {
  945.     return (__std_smf_cyl_neumann(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  946. }
  947.  
  948. // FUNCTION ellint_1
  949. _NODISCARD inline double ellint_1(const double _Arg1, const double _Arg2)
  950. {
  951.     return (__std_smf_ellint_1(_Arg1, _Arg2));
  952. }
  953.  
  954. // FUNCTION ellint_1f
  955. _NODISCARD inline float ellint_1f(const float _Arg1, const float _Arg2)
  956. {
  957.     return (__std_smf_ellint_1f(_Arg1, _Arg2));
  958. }
  959.  
  960. // FUNCTION ellint_1l
  961. _NODISCARD inline long double ellint_1l(const long double _Arg1, const long double _Arg2)
  962. {
  963.     return (__std_smf_ellint_1(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  964. }
  965.  
  966. // FUNCTION ellint_2
  967. _NODISCARD inline double ellint_2(const double _Arg1, const double _Arg2)
  968. {
  969.     return (__std_smf_ellint_2(_Arg1, _Arg2));
  970. }
  971.  
  972. // FUNCTION ellint_2f
  973. _NODISCARD inline float ellint_2f(const float _Arg1, const float _Arg2)
  974. {
  975.     return (__std_smf_ellint_2f(_Arg1, _Arg2));
  976. }
  977.  
  978. // FUNCTION ellint_2l
  979. _NODISCARD inline long double ellint_2l(const long double _Arg1, const long double _Arg2)
  980. {
  981.     return (__std_smf_ellint_2(static_cast<double>(_Arg1), static_cast<double>(_Arg2)));
  982. }
  983.  
  984. // FUNCTION ellint_3
  985. _NODISCARD inline double ellint_3(const double _Arg1, const double _Arg2, const double _Arg3)
  986. {
  987.     return (__std_smf_ellint_3(_Arg1, _Arg2, _Arg3));
  988. }
  989.  
  990. // FUNCTION ellint_3f
  991. _NODISCARD inline float ellint_3f(const float _Arg1, const float _Arg2, const float _Arg3)
  992. {
  993.     return (__std_smf_ellint_3f(_Arg1, _Arg2, _Arg3));
  994. }
  995.  
  996. // FUNCTION ellint_3l
  997. _NODISCARD inline long double ellint_3l(const long double _Arg1, const long double _Arg2,
  998.     const long double _Arg3)
  999. {
  1000.     return (__std_smf_ellint_3(static_cast<double>(_Arg1), static_cast<double>(_Arg2),
  1001.         static_cast<double>(_Arg3)));
  1002. }
  1003.  
  1004. // FUNCTION expint
  1005. _NODISCARD inline double expint(const double _Arg)
  1006. {
  1007.     return (__std_smf_expint(_Arg));
  1008. }
  1009.  
  1010. // FUNCTION expintf
  1011. _NODISCARD inline float expintf(const float _Arg)
  1012. {
  1013.     return (__std_smf_expintf(_Arg));
  1014. }
  1015.  
  1016. // FUNCTION expintl
  1017. _NODISCARD inline long double expintl(const long double _Arg)
  1018. {
  1019.     return (__std_smf_expint(static_cast<double>(_Arg)));
  1020. }
  1021.  
  1022. // FUNCTION hermite
  1023. _NODISCARD inline double hermite(const unsigned int _Arg1, const double _Arg2)
  1024. {
  1025.     return (__std_smf_hermite(_Arg1, _Arg2));
  1026. }
  1027.  
  1028. // FUNCTION hermitef
  1029. _NODISCARD inline float hermitef(const unsigned int _Arg1, const float _Arg2)
  1030. {
  1031.     return (__std_smf_hermitef(_Arg1, _Arg2));
  1032. }
  1033.  
  1034. // FUNCTION hermitel
  1035. _NODISCARD inline long double hermitel(const unsigned int _Arg1, const long double _Arg2)
  1036. {
  1037.     return (__std_smf_hermite(_Arg1, static_cast<double>(_Arg2)));
  1038. }
  1039.  
  1040. // FUNCTION laguerre
  1041. _NODISCARD inline double laguerre(const unsigned int _Arg1, const double _Arg2)
  1042. {
  1043.     return (__std_smf_laguerre(_Arg1, _Arg2));
  1044. }
  1045.  
  1046. // FUNCTION laguerref
  1047. _NODISCARD inline float laguerref(const unsigned int _Arg1, const float _Arg2)
  1048. {
  1049.     return (__std_smf_laguerref(_Arg1, _Arg2));
  1050. }
  1051.  
  1052. // FUNCTION laguerrel
  1053. _NODISCARD inline long double laguerrel(const unsigned int _Arg1, const long double _Arg2)
  1054. {
  1055.     return (__std_smf_laguerre(_Arg1, static_cast<double>(_Arg2)));
  1056. }
  1057.  
  1058. // FUNCTION legendre
  1059. _NODISCARD inline double legendre(const unsigned int _Degree, const double _Value)
  1060. {
  1061.     return (__std_smf_legendre(_Degree, _Value));
  1062. }
  1063.  
  1064. // FUNCTION legendref
  1065. _NODISCARD inline float legendref(const unsigned int _Degree, const float _Value)
  1066. {
  1067.     return (__std_smf_legendref(_Degree, _Value));
  1068. }
  1069.  
  1070. // FUNCTION legendrel
  1071. _NODISCARD inline long double legendrel(const unsigned int _Degree, const long double _Value)
  1072. {
  1073.     return (__std_smf_legendre(_Degree, static_cast<double>(_Value)));
  1074. }
  1075.  
  1076. // FUNCTION riemann_zeta
  1077. _NODISCARD inline double riemann_zeta(const double _Arg)
  1078. {
  1079.     return (__std_smf_riemann_zeta(_Arg));
  1080. }
  1081.  
  1082. // FUNCTION riemann_zetaf
  1083. _NODISCARD inline float riemann_zetaf(const float _Arg)
  1084. {
  1085.     return (__std_smf_riemann_zetaf(_Arg));
  1086. }
  1087.  
  1088. // FUNCTION riemann_zetal
  1089. _NODISCARD inline long double riemann_zetal(const long double _Arg)
  1090. {
  1091.     return (__std_smf_riemann_zeta(static_cast<double>(_Arg)));
  1092. }
  1093.  
  1094. // FUNCTION sph_bessel
  1095. _NODISCARD inline double sph_bessel(const unsigned int _Arg1, const double _Arg2)
  1096. {
  1097.     return (__std_smf_sph_bessel(_Arg1, _Arg2));
  1098. }
  1099.  
  1100. // FUNCTION sph_besself
  1101. _NODISCARD inline float sph_besself(const unsigned int _Arg1, const float _Arg2)
  1102. {
  1103.     return (__std_smf_sph_besself(_Arg1, _Arg2));
  1104. }
  1105.  
  1106. // FUNCTION sph_bessell
  1107. _NODISCARD inline long double sph_bessell(const unsigned int _Arg1, const long double _Arg2)
  1108. {
  1109.     return (__std_smf_sph_bessel(_Arg1, static_cast<double>(_Arg2)));
  1110. }
  1111.  
  1112. // FUNCTION sph_legendre
  1113. _NODISCARD inline double sph_legendre(const unsigned int _Arg1, const unsigned int _Arg2,
  1114.     const double _Theta)
  1115. {
  1116.     return (__std_smf_sph_legendre(_Arg1, _Arg2, _Theta));
  1117. }
  1118.  
  1119. // FUNCTION sph_legendref
  1120. _NODISCARD inline float sph_legendref(const unsigned int _Arg1, const unsigned int _Arg2,
  1121.     const float _Theta)
  1122. {
  1123.     return (__std_smf_sph_legendref(_Arg1, _Arg2, _Theta));
  1124. }
  1125.  
  1126. // FUNCTION sph_legendrel
  1127. _NODISCARD inline long double sph_legendrel(const unsigned int _Arg1, const unsigned int _Arg2,
  1128.     const long double _Theta)
  1129. {
  1130.     return (__std_smf_sph_legendre(_Arg1, _Arg2, static_cast<double>(_Theta)));
  1131. }
  1132.  
  1133. // FUNCTION sph_neumann
  1134. _NODISCARD inline double sph_neumann(const unsigned int _Arg1, const double _Arg2)
  1135. {
  1136.     return (__std_smf_sph_neumann(_Arg1, _Arg2));
  1137. }
  1138.  
  1139. // FUNCTION sph_neumannf
  1140. _NODISCARD inline float sph_neumannf(const unsigned int _Arg1, const float _Arg2)
  1141. {
  1142.     return (__std_smf_sph_neumannf(_Arg1, _Arg2));
  1143. }
  1144.  
  1145. // FUNCTION sph_neumannl
  1146. _NODISCARD inline long double sph_neumannl(const unsigned int _Arg1, const long double _Arg2)
  1147. {
  1148.     return (__std_smf_sph_neumann(_Arg1, static_cast<double>(_Arg2)));
  1149. }
  1150. #endif /* _HAS_SPECIAL_MATH */
  1151.  
  1152. // FUNCTION hypot (3-argument overloads)
  1153. _NODISCARD inline double hypot(const double _Dx, const double _Dy, const double _Dz)
  1154. {
  1155.     return (__std_smf_hypot3(_Dx, _Dy, _Dz));
  1156. }
  1157.  
  1158. _NODISCARD inline float hypot(const float _Dx, const float _Dy, const float _Dz)
  1159. {
  1160.     return (__std_smf_hypot3f(_Dx, _Dy, _Dz));
  1161. }
  1162.  
  1163. _NODISCARD inline long double hypot(const long double _Dx, const long double _Dy,
  1164.     const long double _Dz)
  1165. {
  1166.     return (__std_smf_hypot3(static_cast<double>(_Dx), static_cast<double>(_Dy),
  1167.         static_cast<double>(_Dz)));
  1168. }
  1169.  
  1170. template<class _Ty1,
  1171.     class _Ty2,
  1172.     class _Ty3,
  1173.     enable_if_t<is_arithmetic_v<_Ty1> && is_arithmetic_v<_Ty2> && is_arithmetic_v<_Ty3>, int> = 0>
  1174.     _NODISCARD inline auto hypot(const _Ty1 _Dx, const _Ty2 _Dy, const _Ty3 _Dz)
  1175. {   // N4727 [cmath.syn]/2 "Sufficient additional overloads"
  1176.     // Note that this template is selected by overload resolution only when at least one
  1177.     // argument is double/long double/integral but not all three are double or long double.
  1178.     using _Common = _Common_float_type_t<_Ty1, _Common_float_type_t<_Ty2, _Ty3>>; // TRANSITION, fold expressions
  1179.     const auto _Result = __std_smf_hypot3(static_cast<double>(_Dx), static_cast<double>(_Dy),
  1180.         static_cast<double>(_Dz));
  1181.     return (static_cast<_Common>(_Result));
  1182. }
  1183. _STD_END
  1184. #endif /* _HAS_CXX17 */
  1185.  
  1186. #pragma pop_macro("new")
  1187. _STL_RESTORE_CLANG_WARNINGS
  1188. #pragma warning(pop)
  1189. #pragma pack(pop)
  1190.  
  1191. #endif /* RC_INVOKED */
  1192. #endif /* _CMATH_ */
  1193.  
  1194. /*
  1195.  * Copyright (c) by P.J. Plauger. All rights reserved.
  1196.  * Consult your license regarding permissions and restrictions.
  1197. V6.50:0009 */
  1198.  
  1199.  
  1200. namespace Engine
  1201. {
  1202.     class CPlayer;
  1203. }
  1204.  
  1205.  
  1206. using namespace Engine;
  1207. class matrix3x4_t;
  1208.  
  1209. typedef float vec_t;
  1210. class Vector {
  1211. public:
  1212.     // Members
  1213.     vec_t x, y, z;
  1214.  
  1215.     // Construction/destruction:
  1216.     Vector(void);
  1217.     Vector(vec_t X, vec_t Y, vec_t Z);
  1218.     Vector(vec_t* clr);
  1219.  
  1220.     // Initialization
  1221.     void Init(vec_t ix = 0.0f, vec_t iy = 0.0f, vec_t iz = 0.0f);
  1222.     // TODO (Ilya): Should there be an init that takes a single float for consistency?
  1223.  
  1224.     // Got any nasty NAN's?
  1225.     bool IsValid() const;
  1226.     void Invalidate();
  1227.  
  1228.     // array access...
  1229.     vec_t operator[](int i) const;
  1230.     vec_t& operator[](int i);
  1231.  
  1232.     // Base address...
  1233.     vec_t* Base();
  1234.     vec_t const* Base() const;
  1235.  
  1236.     // Initialization methods
  1237.     void Random(vec_t minVal, vec_t maxVal);
  1238.     void Zero(); ///< zero out a vector
  1239.  
  1240.                  // equality
  1241.     bool operator==(const Vector& v) const;
  1242.     bool operator!=(const Vector& v) const;
  1243.  
  1244.     // arithmetic operations
  1245.     Vector& operator+=(const Vector& v) {
  1246.         x += v.x; y += v.y; z += v.z;
  1247.         return *this;
  1248.     }
  1249.  
  1250.     Vector& operator-=(const Vector& v) {
  1251.         x -= v.x; y -= v.y; z -= v.z;
  1252.         return *this;
  1253.     }
  1254.  
  1255.     Vector& operator*=(float fl) {
  1256.         x *= fl;
  1257.         y *= fl;
  1258.         z *= fl;
  1259.         return *this;
  1260.     }
  1261.  
  1262.     Vector& operator*=(const Vector& v) {
  1263.         x *= v.x;
  1264.         y *= v.y;
  1265.         z *= v.z;
  1266.         return *this;
  1267.     }
  1268.  
  1269.     Vector& operator/=(const Vector& v) {
  1270.         x /= v.x;
  1271.         y /= v.y;
  1272.         z /= v.z;
  1273.         return *this;
  1274.     }
  1275.  
  1276.     // this ought to be an opcode.
  1277.     Vector& operator+=(float fl) {
  1278.         x += fl;
  1279.         y += fl;
  1280.         z += fl;
  1281.         return *this;
  1282.     }
  1283.  
  1284.     // this ought to be an opcode.
  1285.     Vector& operator/=(float fl) {
  1286.         x /= fl;
  1287.         y /= fl;
  1288.         z /= fl;
  1289.         return *this;
  1290.     }
  1291.     Vector& operator-=(float fl) {
  1292.         x -= fl;
  1293.         y -= fl;
  1294.         z -= fl;
  1295.         return *this;
  1296.     }
  1297.  
  1298.     // negate the vector components
  1299.     void    Negate();
  1300.  
  1301.     // Get the vector's magnitude.
  1302.     vec_t   Length() const;
  1303.  
  1304.     // Get the vector's magnitude squared.
  1305.     vec_t LengthSqr(void) const {
  1306.         return (x*x + y * y + z * z);
  1307.     }
  1308.  
  1309.     // return true if this vector is (0,0,0) within tolerance
  1310.     bool IsZero(float tolerance = 0.01f) const {
  1311.         return (x > -tolerance && x < tolerance &&
  1312.             y > -tolerance && y < tolerance &&
  1313.             z > -tolerance && z < tolerance);
  1314.     }
  1315.  
  1316.     vec_t   NormalizeInPlace();
  1317.     Vector  Normalized() const;
  1318.  
  1319.     bool    IsLengthGreaterThan(float val) const {
  1320.         return LengthSqr() > val*val;
  1321.     }
  1322.  
  1323.     bool    IsLengthLessThan(float val) const {
  1324.         return LengthSqr() < val*val;
  1325.     }
  1326.  
  1327.     // check if a vector is within the box defined by two other vectors
  1328.     bool WithinAABox(Vector const &boxmin, Vector const &boxmax);
  1329.  
  1330.     // Get the distance from this vector to the other one.
  1331.     vec_t   DistTo(const Vector &vOther) const;
  1332.  
  1333.     // Get the distance from this vector to the other one squared.
  1334.     // NJS: note, VC wasn't inlining it correctly in several deeply nested inlines due to being an 'out of line' .  
  1335.     // may be able to tidy this up after switching to VC7
  1336.     vec_t DistToSqr(const Vector &vOther) const {
  1337.         Vector delta;
  1338.  
  1339.         delta.x = x - vOther.x;
  1340.         delta.y = y - vOther.y;
  1341.         delta.z = z - vOther.z;
  1342.  
  1343.         return delta.LengthSqr();
  1344.     }
  1345.  
  1346.     // Copy
  1347.     void    CopyToArray(float* rgfl) const;
  1348.  
  1349.     // Multiply, add, and assign to this (ie: *this = a + b * scalar). This
  1350.     // is about 12% faster than the actual vector equation (because it's done per-component
  1351.     // rather than per-vector).
  1352.     void    MulAdd(const Vector& a, const Vector& b, float scalar);
  1353.  
  1354.     // Dot product.
  1355.     vec_t   Dot(const Vector& vOther) const;
  1356.  
  1357.     // assignment
  1358.     Vector& operator=(const Vector &vOther);
  1359.  
  1360.     // 2d
  1361.     vec_t   Length2D(void) const {
  1362.         return sqrt(x * x + y * y);
  1363.     }
  1364.     vec_t   Length2DSqr(void) const {
  1365.         return (x*x + y * y);
  1366.     }
  1367.  
  1368.     /// get the component of this vector parallel to some other given vector
  1369.     Vector  ProjectOnto(const Vector& onto);
  1370.  
  1371.     // copy constructors
  1372.     //  Vector(const Vector &vOther);
  1373.  
  1374.     // arithmetic operations
  1375.     Vector  operator-(void) const;
  1376.  
  1377.     Vector  operator+(const Vector& v) const;
  1378.     Vector  operator-(const Vector& v) const;
  1379.     Vector  operator*(const Vector& v) const;
  1380.     Vector  operator/(const Vector& v) const;
  1381.     Vector  operator*(float fl) const;
  1382.     Vector  operator/(float fl) const;
  1383.  
  1384.     // Cross product between two vectors.
  1385.     Vector  Cross(const Vector &vOther) const;
  1386.  
  1387.     // Returns a vector with the min or max in X, Y, and Z.
  1388.     Vector  Min(const Vector &vOther) const;
  1389.     Vector  Max(const Vector &vOther) const;
  1390. };
  1391.  
  1392. class TableVector
  1393. {
  1394. public:
  1395.     vec_t x, y, z;
  1396.  
  1397.     operator Vector &() { return *((Vector *)(this)); }
  1398.     operator const Vector &() const { return *((const Vector *)(this)); }
  1399.  
  1400.     // array access...
  1401.     inline vec_t& operator[](int i)
  1402.     {
  1403.         return ((vec_t*)this)[i];
  1404.     }
  1405.  
  1406.     inline vec_t operator[](int i) const
  1407.     {
  1408.         return ((vec_t*)this)[i];
  1409.     }
  1410. };
  1411.  
  1412. void VectorTransform(const Vector& in1, const matrix3x4_t& in2, Vector& out);
  1413. void VectorCopy(const Vector& src, Vector& dst);
  1414. float VectorLength(const Vector& v);
  1415. void VectorLerp(const Vector& src1, const Vector& src2, vec_t t, Vector& dest);
  1416. void VectorCrossProduct(const Vector& a, const Vector& b, Vector& result);
  1417. vec_t NormalizeVector(Vector& v);
  1418.  
  1419. class __declspec(align(16)) VectorAligned : public Vector {
  1420. public:
  1421.     inline VectorAligned(void) {};
  1422.     inline VectorAligned(vec_t X, vec_t Y, vec_t Z) {
  1423.         Init(X, Y, Z);
  1424.     }
  1425.  
  1426. public:
  1427.     explicit VectorAligned(const Vector &vOther) {
  1428.         Init(vOther.x, vOther.y, vOther.z);
  1429.     }
  1430.  
  1431.     VectorAligned& operator=(const Vector &vOther) {
  1432.         Init(vOther.x, vOther.y, vOther.z);
  1433.         return *this;
  1434.     }
  1435.  
  1436.     VectorAligned& operator=(const VectorAligned &vOther) {
  1437.         this->Base()[0] = vOther.Base()[0];
  1438.         this->Base()[1] = vOther.Base()[1];
  1439.         this->Base()[2] = vOther.Base()[2];
  1440.         return *this;
  1441.     }
  1442.  
  1443.     float w;
  1444.  
  1445.     class CRadar
  1446.     {
  1447.     public:
  1448.         //[swap_lines]
  1449.         void RadarRange(float* x, float* y, float range);
  1450.         void CalcRadarPoint(Vector vOrigin, int& screenx, int& screeny);
  1451.         void OnRenderPlayer();
  1452.         void OnRender();
  1453.         //[/swap_lines]
  1454.     };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top