function drotg( a, b, out, stride, offset ) {
	var scale;
	var sign;
	var aa;
	var ab;
	var r;
	var c;
	var s;
	var z;

	aa = abs( a );
	ab = abs( b );
	if ( aa > ab ) {
		sign = copysign( 1.0, a );
	} else {
		sign = copysign( 1.0, b );
	}
	scale = aa + ab;
	if ( scale === 0.0 ) {
		c = 1.0;
		s = 0.0;
		r = 0.0;
		z = 0.0;
	} else {
		r = scale * sqrt( abs2( a/scale ) + abs2( b/scale ) );
		r *= sign;
		c = a / r;
		s = b / r;
		z = 1.0;
		if ( aa > ab ) {
			z = s;
		} else if ( c !== 0.0 ) {
			z = 1.0 / c;
		}
	}
	a = r;
	b = z;
	out[ offset ] = a;
	out[ offset + stride ] = b;
	out[ offset + ( 2 * stride ) ] = c;
	out[ offset + ( 3 * stride ) ] = s;
	return out;
}
Constructs a Givens plane rotation.

@param {number} a - rotational elimination parameter
@param {number} b - rotational elimination parameter
@param {Float64Array} out - output array
@param {integer} stride - index increment
@param {NonNegativeInteger} offset - starting index
@returns {Float64Array} output array

@example
var Float64Array = require( '@stdlib/array/float64' );

var out = drotg( 0.0, 2.0, new Float64Array( 4 ), 1, 0 );
// returns <Float64Array>[ 2.0, 1.0, 0.0, 1.0 ]