warp.copysign ============= .. currentmodule:: warp._src.lang .. function:: copysign(x: Float, y: Float) -> Float .. wp-function-tags:: :kernel: true :python: true :differentiable: true Return a value with the magnitude of ``x`` and the sign of ``y``. For example, ``wp.copysign(3.0, -1.0)`` returns ``-3.0`` and ``wp.copysign(-3.0, 1.0)`` returns ``3.0``. Useful for forcing a specific sign on a result whose signed-zero behavior is otherwise implementation-defined (e.g. ``wp.min(-0.0, +0.0)``).