// defaultShapeIsFull reports whether this shape contains all points on the sphere.
978796
func defaultShapeIsFull(s Shape) bool {
	return s.NumEdges() == 0 && s.Dimension() == 2 && s.NumChains() > 0
}
1234697
func UnmarshalTable(t *ast.Table, v interface{}) error {
	return DefaultConfig.UnmarshalTable(t, v)
}
463697
func (a *API) removeUnusedShapes() {
	for _, s := range a.Shapes {
		if len(s.refs) == 0 {
			a.removeShape(s)
		}
	}
}
279593
func DefaultExtFilter() ExtFilter {
	m := ExtFilter{Exts: make(Set)}
	for _, extension := range defaultExtensions {
		m.Exts.Add(extension)
	}
	return m
}
685972
func SetDefaultBool(in bool) boolRuleOpt {
	return func(i *rpc.BoolRule) {
		i.Default = in
		i.HasDefault = true
	}
}
1232277
func (s Style) GetFillColor(defaults ...drawing.Color) drawing.Color {
	if s.FillColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.FillColor
}
633744
func (s *CloudWatchDimensionConfiguration) SetDefaultDimensionValue(v string) *CloudWatchDimensionConfiguration {
	s.DefaultDimensionValue = &v
	return s
}
1203418
func (b *Box) MinSizeHint() image.Point {
	var minSize image.Point

	for _, child := range b.children {
		size := child.MinSizeHint()
		if b.Alignment() == Horizontal {
			minSize.X += size.X
			if size.Y > minSize.Y {
				minSize.Y = size.Y
			}
		} else {
			minSize.Y += size.Y
			if size.X > minSize.X {
				minSize.X = size.X
			}
		}
	}

	if b.border {
		minSize = minSize.Add(image.Point{2, 2})
	}

	return minSize
}
798381
func SCCAllowsFSTypeInternal(scc *securityapi.SecurityContextConstraints, fsType securityapi.FSType) bool {
	if scc == nil {
		return false
	}

	for _, v := range scc.Volumes {
		if v == fsType || v == securityapi.FSTypeAll {
			return true
		}
	}
	return false
}
365784
func (l *List) SizeHint() image.Point {
	var width int
	for _, item := range l.items {
		if w := stringWidth(item); w > width {
			width = w
		}
	}
	return image.Point{width, len(l.items)}
}
553477
func (b ShapeValueBuilder) BuildShape(ref *ShapeRef, shapes map[string]interface{}, isMap bool) string {
	order := make([]string, len(shapes))
	for k := range shapes {
		order = append(order, k)
	}
	sort.Strings(order)

	ret := ""
	for _, name := range order {
		if name == "" {
			continue
		}
		shape := shapes[name]

		// If the shape isn't a map, we want to export the value, since every field
		// defined in our shapes are exported.
		if len(name) > 0 && !isMap && strings.ToLower(name[0:1]) == name[0:1] {
			name = strings.Title(name)
		}

		memName := name
		passRef := ref.Shape.MemberRefs[name]

		if isMap {
			memName = fmt.Sprintf("%q", memName)
			passRef = &ref.Shape.ValueRef
		}

		switch v := shape.(type) {
		case map[string]interface{}:
			ret += b.BuildComplex(name, memName, passRef, v)
		case []interface{}:
			ret += b.BuildList(name, memName, passRef, v)
		default:
			ret += b.BuildScalar(name, memName, passRef, v, ref.Shape.Payload == name)
		}
	}
	return ret
}
715447
func (c *IniConfigContainer) DefaultBool(key string, defaultval bool) bool {
	v, err := c.Bool(key)
	if err != nil {
		return defaultval
	}
	return v
}
602871
func (f *PkgFilter) IsFull() bool {
	// Batch validate bytes that are fully used.
	for i := uint16(0); i < f.count/8; i++ {
		if f.filter[i] != 0xFF {
			return false
		}
	}

	// If the count is not a multiple of 8, check that the filter contains
	// all remaining bits.
	rem := f.count % 8
	for idx := f.count - rem; idx < f.count; idx++ {
		if !f.Contains(idx) {
			return false
		}
	}

	return true
}
637454
func MakeDefaultRuleTemplate(defaultRule string, funcMap template.FuncMap) (*template.Template, error) {
	defaultFuncMap := sprig.TxtFuncMap()
	defaultFuncMap["normalize"] = Normalize

	for k, fn := range funcMap {
		defaultFuncMap[k] = fn
	}

	return template.New("defaultRule").Funcs(defaultFuncMap).Parse(defaultRule)
}
433555
func ConvexHullFlat(layout geom.Layout, coords []float64) geom.T {
	calc := convexHullCalculator{
		inputPts: coords,
		layout:   layout,
		stride:   layout.Stride(),
	}
	return calc.getConvexHull()
}
1057650
func (tr Matrix) TransformRectangle(x0, y0, x2, y2 float64) (nx0, ny0, nx2, ny2 float64) {
	points := []float64{x0, y0, x2, y0, x2, y2, x0, y2}
	tr.Transform(points)
	points[0], points[2] = minMax(points[0], points[2])
	points[4], points[6] = minMax(points[4], points[6])
	points[1], points[3] = minMax(points[1], points[3])
	points[5], points[7] = minMax(points[5], points[7])

	nx0 = math.Min(points[0], points[4])
	ny0 = math.Min(points[1], points[5])
	nx2 = math.Max(points[2], points[6])
	ny2 = math.Max(points[3], points[7])
	return nx0, ny0, nx2, ny2
}
1030421
func IsTruthful(in interface{}) bool {
	switch v := in.(type) {
	case reflect.Value:
		return IsTruthfulValue(v)
	default:
		return IsTruthfulValue(reflect.ValueOf(in))
	}

}