// ExtractMaxScale extracts the maximum scaling from a homogeneous matrix
431190
func ExtractMaxScale(m Mat4) float32 {
	scaleX := float64(m[0]*m[0] + m[1]*m[1] + m[2]*m[2])
	scaleY := float64(m[4]*m[4] + m[5]*m[5] + m[6]*m[6])
	scaleZ := float64(m[8]*m[8] + m[9]*m[9] + m[10]*m[10])

	return float32(math.Sqrt(math.Max(scaleX, math.Max(scaleY, scaleZ))))
}
1331773
func (env *Env) MaxKeySize() int {
	if env == nil {
		return int(C.mdb_env_get_maxkeysize(nil))
	}
	return int(C.mdb_env_get_maxkeysize(env._env))
}
188234
func (window *Window) GetMaximumSize() (w, h int32) {
	var _w, _h C.int
	C.SDL_GetWindowMaximumSize(window.cptr(), &_w, &_h)
	return int32(_w), int32(_h)
}
919298
func parseMaxSize(size string) (int64, error) {
	quantity, err := resource.ParseQuantity(size)
	if err != nil {
		return 0, err
	}
	maxSize, ok := quantity.AsInt64()
	if !ok {
		return 0, fmt.Errorf("invalid max log size")
	}
	if maxSize < 0 {
		return 0, fmt.Errorf("negative max log size %d", maxSize)
	}
	return maxSize, nil
}
276114
func ExtractCustomRanking(opts ...interface{}) *opt.CustomRankingOption {
	for _, o := range opts {
		if v, ok := o.(*opt.CustomRankingOption); ok {
			return v
		}
	}
	return nil
}
236492
func max(n []int) int {
	val := 0
	for _, i := range n {
		if i > val {
			val = i
		}
	}
	return val
}
54303
func (tag PluginStructTag) GetMetricScale() int64 {
	tagValue, tagSet := reflect.StructTag(tag).Lookup(PluginStructTagMetric)
	if !tagSet {
		return 1
	}

	return metricScale[strings.ToLower(tagValue)]
}
853226
func (c *Configuration) MaxSize(max int64) *Configuration {
	c.maxSize = max
	return c
}
363811
func extractMaxValue(field intstr.IntOrString, name string, value int) (int, error) {
	switch field.Type {
	case intstr.Int:
		if field.IntVal < 0 {
			return 0, fmt.Errorf("%s must be >= 0", name)
		}
		return field.IntValue(), nil
	case intstr.String:
		s := strings.Replace(field.StrVal, "%", "", -1)
		v, err := strconv.Atoi(s)
		if err != nil {
			return 0, fmt.Errorf("invalid %s value %q: %v", name, field.StrVal, err)
		}
		if v < 0 {
			return 0, fmt.Errorf("%s must be >= 0", name)
		}
		return int(math.Ceil(float64(value) * (float64(v)) / 100)), nil
	}
	return 0, fmt.Errorf("invalid kind %q for %s", field.Type, name)
}
893599
func ExtractRestrictHighlightAndSnippetArrays(opts ...interface{}) *opt.RestrictHighlightAndSnippetArraysOption {
	for _, o := range opts {
		if v, ok := o.(*opt.RestrictHighlightAndSnippetArraysOption); ok {
			return v
		}
	}
	return nil
}
520073
func (f *File) GetMaxAllChannels() (ret []float64, ok bool) {
	c := f.Format.Channels
	ret = make([]float64, c)
	e := C.sf_command(f.s, C.SFC_GET_MAX_ALL_CHANNELS, unsafe.Pointer(&ret[0]), C.int(c*8))
	if e == C.SF_TRUE {
		ok = true
	}
	return
}
294454
func ExtractColumnSet(exprs []Expression) *intsets.Sparse {
	set := &intsets.Sparse{}
	for _, expr := range exprs {
		extractColumnSet(expr, set)
	}
	return set
}
181942
func ExtractLimit(opts ...interface{}) *opt.LimitOption {
	for _, o := range opts {
		if v, ok := o.(*opt.LimitOption); ok {
			return v
		}
	}
	return nil
}
1353676
func (s *UniformSample) Max() int64 {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	return SampleMax(s.values)
}
362136
func (c *Client) ExtractVolume(p *ExtractVolumeParameter) (*Volume, error) {
	obj, err := c.Request("extractVolume", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Volume), err
}
1229809
func ExtractMinimumAroundRadius(opts ...interface{}) *opt.MinimumAroundRadiusOption {
	for _, o := range opts {
		if v, ok := o.(*opt.MinimumAroundRadiusOption); ok {
			return v
		}
	}
	return nil
}
717467
func ExtractMinProximity(opts ...interface{}) *opt.MinProximityOption {
	for _, o := range opts {
		if v, ok := o.(*opt.MinProximityOption); ok {
			return v
		}
	}
	return nil
}