SDL  2.0
s_copysign.c File Reference
#include "math_libm.h"
#include "math_private.h"
+ Include dependency graph for s_copysign.c:

Go to the source code of this file.

Functions

double copysign (double x, double y)
 

Function Documentation

◆ copysign()

double copysign ( double  x,
double  y 
)

Definition at line 21 of file s_copysign.c.

22 {
23  u_int32_t hx,hy;
24  GET_HIGH_WORD(hx,x);
25  GET_HIGH_WORD(hy,y);
26  SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
27  return x;
28 }

References GET_HIGH_WORD, and SET_HIGH_WORD.

Referenced by scalbln(), and SDL_copysign().

SET_HIGH_WORD
#define SET_HIGH_WORD(d, v)
Definition: math_private.h:137
x
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
u_int32_t
unsigned int u_int32_t
Definition: math_private.h:31
y
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
GET_HIGH_WORD
#define GET_HIGH_WORD(i, d)
Definition: math_private.h:109