// Scaleneg returns a*b when a < 0, otherwise a.
961967
func (c C) Scaleneg(val Input) Input {
	if c < 0 {
		return c.Mul(val)
	}
	return c
}
624195
func Scale3D(scaleX, scaleY, scaleZ float32) Mat4 {

	return Mat4{float32(scaleX), 0, 0, 0, 0, float32(scaleY), 0, 0, 0, 0, float32(scaleZ), 0, 0, 0, 0, 1}
}
889852
func (mat *T) Scale(f float64) *T {
	mat[0][0] *= f
	mat[1][1] *= f
	mat[2][2] *= f
	return mat
}
160543
func (p *Project) Scale(c *check.C, service string, count int) {
	c.Assert(p.project.Scale(service, count), check.IsNil,
		check.Commentf("error while scaling the service '%s'", service))
}
911105
func (d *Context) Pnew(nargs int) error {
	result := int(C.duk_pnew(d.duk_context, C.duk_idx_t(nargs)))
	return d.castStringToError(result)
}
1094174
func Linear(width int) ScaleFunc {
	return func(min, max, value float64) float64 {
		diff := max - min
		offset := value - min
		ratio := offset / diff
		return ratio * float64(width)
	}
}
261687
func (e *G1) Neg(a *G1) *G1 {
	if e.p == nil {
		e.p = &curvePoint{}
	}
	e.p.Neg(a.p)
	return e
}
1100969
func (q *Quantity) ScaledValue(scale Scale) int64 {
	if q.Amount == nil {
		return 0
	}
	return scaledValue(q.Amount.UnscaledBig(), int(q.Amount.Scale()), int(scale.infScale()))
}
1224503
func ScaleVector(v *Vector, s float64) *Vector {
	return NewVector(v.x*s, v.y*s)
}
91335
func Convert_autoscaling_Scale_To_v1beta2_Scale(in *autoscaling.Scale, out *v1beta2.Scale, s conversion.Scope) error {
	return autoConvert_autoscaling_Scale_To_v1beta2_Scale(in, out, s)
}
1150511
func (mat *T) ScaleVec2(s *vec2.T) *T {
	mat[0][0] *= s[0]
	mat[1][1] *= s[1]
	return mat
}
1140893
func bigScalex(z, x *big.Int, scale int) *big.Int {
	if scale > 0 {
		return arith.MulBigPow10(z, x, uint64(scale))
	}
	return z.Quo(x, arith.BigPow10(uint64(-scale)))
}
536173
func Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *v1.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error {
	return autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s)
}
763864
func (t *Text) AddScale(s float32) bool {
	if s < 0 && t.Scale <= t.ScaleMin {
		return false
	}
	if s > 0 && t.Scale >= t.ScaleMax {
		return false
	}
	t.Scale += s
	t.scaleMatrix = mgl32.Scale3D(t.Scale, t.Scale, t.Scale)
	return true
}
764275
func Scale(dst draw.Image, src image.Image) error {
	if dst == nil {
		return errors.New("graphics: dst is nil")
	}
	if src == nil {
		return errors.New("graphics: src is nil")
	}

	b := dst.Bounds()
	srcb := src.Bounds()
	if b.Empty() || srcb.Empty() {
		return nil
	}
	sx := float64(b.Dx()) / float64(srcb.Dx())
	sy := float64(b.Dy()) / float64(srcb.Dy())
	return I.Scale(sx, sy).Transform(dst, src, interp.Bilinear)
}
300897
func (m Matrix) Scaled(around Vec, scale float64) Matrix {
	return m.ScaledXY(around, V(scale, scale))
}
55162
func (mat *T) ScaleVec3(s *vec3.T) *T {
	mat[0][0] *= s[0]
	mat[1][1] *= s[1]
	mat[2][2] *= s[2]
	return mat
}