// Sub performs an element-wise subtraction of two matrices, this is
// equivalent to iterating over every element of m1 and subtracting the corresponding value of m2.
437844
func (m1 Mat3x4) Sub(m2 Mat3x4) Mat3x4 {
	return Mat3x4{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8], m1[9] - m2[9], m1[10] - m2[10], m1[11] - m2[11]}
}
1036332
func Subtract(s1 Set, s2 Set) Set {
	if s1 == nil {
		if s2 == nil {
			return nil
		}

		return s2.New()
	}
	s3 := s1.Copy()
	s3.Subtract(s2)
	return s3
}
1080150
func (v Version) Sub() string {
	parts := strings.SplitN(string(v), ".", 3)
	if len(parts) == 3 {
		return parts[2]
	}
	return ""
}
724132
func Sub(a, b []float32) {
	b = b[:len(a)]
	for i, v := range a {
		a[i] = v - b[i]
	}
}
174079
func (m1 Mat3) Sub(m2 Mat3) Mat3 {
	return Mat3{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7], m1[8] - m2[8]}
}
582532
func (t *Time) Sub(t1 *Time) Duration {
	var duration gotime.Duration
	if t.Type == mysql.TypeTimestamp && t1.Type == mysql.TypeTimestamp {
		// TODO: Consider time_zone variable.
		a, _ := t.Time.GoTime(gotime.Local)
		b, _ := t1.Time.GoTime(gotime.Local)
		duration = a.Sub(b)
	} else {
		seconds, microseconds, neg := calcTimeDiff(t.Time, t1.Time, 1)
		duration = gotime.Duration(seconds*1e9 + microseconds*1e3)
		if neg {
			duration = -duration
		}
	}

	fsp := t.Fsp
	if fsp < t1.Fsp {
		fsp = t1.Fsp
	}
	return Duration{
		Duration: duration,
		Fsp:      fsp,
	}
}
684344
func (ss StringSet) subtract(set StringSet) {
	for k := range set {
		delete(ss, k)
	}
}
165823
func SubI16x8(x, y I16x8) I16x8 {
	val := I16x8{}
	for i := 0; i < 8; i++ {
		val[i] = x[i] - y[i]
	}
	return val
}
136769
func (app *App) Sub(path string) *SubRouter {
	return app.defaultRouter.Sub(path)
}
294475
func (m1 Mat2x3) Sub(m2 Mat2x3) Mat2x3 {
	return Mat2x3{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5]}
}
315079
func (m1 Mat4x2) Sub(m2 Mat4x2) Mat4x2 {
	return Mat4x2{m1[0] - m2[0], m1[1] - m2[1], m1[2] - m2[2], m1[3] - m2[3], m1[4] - m2[4], m1[5] - m2[5], m1[6] - m2[6], m1[7] - m2[7]}
}
507698
func (r Range) Subtract(other Range) []Range {
	if !r.Overlaps(other) {
		return []Range{r}
	}
	if other.Contains(r) {
		return nil
	}
	var res []Range
	left := Range{r.Start, other.Start}
	right := Range{other.End, r.End}
	if r.Contains(other) {
		if !left.IsEmpty() {
			res = append(res, left)
		}
		if !right.IsEmpty() {
			res = append(res, right)
		}
		return res
	}
	if !r.Start.After(other.Start) {
		if !left.IsEmpty() {
			res = append(res, left)
		}
		return res
	}
	if !right.IsEmpty() {
		res = append(res, right)
	}
	return res
}
273729
func (p *Point) Subtract(p2 Point) *Point {
	p.X -= p2.X
	p.Y -= p2.Y
	return p
}
1264694
func (m1 Mat2) Add(m2 Mat2) Mat2 {
	return Mat2{m1[0] + m2[0], m1[1] + m2[1], m1[2] + m2[2], m1[3] + m2[3]}
}
601269
func (vec *T) Sub(v *T) *T {
	vec[0] -= v[0]
	vec[1] -= v[1]
	return vec
}
1307257
func SubI32x4(x, y I32x4) I32x4 {
	val := I32x4{}
	for i := 0; i < 4; i++ {
		val[i] = x[i] - y[i]
	}
	return val
}
1226460
func (t Term) Sub(args ...interface{}) Term {
	return constructMethodTerm(t, "Sub", p.Term_SUB, args, map[string]interface{}{})
}