warp.copysign#
- warp.copysign(x: Float, y: Float) Float#
Kernel
Differentiable
Return a value with the magnitude of
xand the sign ofy.For example,
wp.copysign(3.0, -1.0)returns-3.0andwp.copysign(-3.0, 1.0)returns3.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)).