#include "SDL_internal.h"1/*2* ====================================================3* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.4*5* Developed at SunPro, a Sun Microsystems, Inc. business.6* Permission to use, copy, modify, and distribute this7* software is freely granted, provided that this notice8* is preserved.9* ====================================================10*/1112/*13* copysign(double x, double y)14* copysign(x,y) returns a value with the magnitude of x and15* with the sign bit of y.16*/1718#include "math_libm.h"19#include "math_private.h"2021double copysign(double x, double y)22{23u_int32_t hx,hy;24GET_HIGH_WORD(hx,x);25GET_HIGH_WORD(hy,y);26SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));27return x;28}29libm_hidden_def(copysign)303132