// AsInt implements Defaulter.
354836
func (d *defaulter) AsInt(v Valuer, dv int) int {
	value, err := v.Value()
	if err != nil {
		d.logValuerError(err)
		return dv
	}
	ivalue, err := strconv.ParseInt(value, 10, 0)
	if err != nil {
		d.logFormatError("int", err)
		return dv
	}
	return int(ivalue)
}
181380
func (j *JSON) Int(name string) (int, error) {
	v, err := j.value(name)
	if err != nil {
		return 0, err
	}

	f, ok := v.(float64)
	if !ok {
		return 0, errors.New(fmt.Sprintf("%T unable", v))
	}

	return int(f), nil
}
247814
func (c *Config) GetInt(s string) int {
	return c.config.GetInt(s)
}
451699
func Asin(inReal []float64) []float64 {
	outReal := make([]float64, len(inReal))
	for i := 0; i < len(inReal); i++ {
		outReal[i] = math.Asin(inReal[i])
	}
	return outReal
}
4210
func (f Flag) Int(name string) (int, error) {
	v, err := f.value(name)
	if err != nil {
		return 0, err
	}

	i, err := strconv.Atoi(v)
	if err != nil {
		return 0, err
	}

	return i, nil
}
521525
func asUint(param string) (uint64, error) {
	i, err := strconv.ParseUint(param, 0, 64)
	if err != nil {
		return 0, ErrBadParameter
	}
	return i, nil
}
241046
func (v Value) Int() (int, error) {
	i, err := strconv.Atoi(v.String())
	if err != nil {
		return 0, v.invalidTypeError(err, "int")
	}
	return i, nil
}
294706
func (s *promScope) SetInt(stat string, value int64) {
	s.autoGauge(s.statName(stat)).Set(float64(value))
}
782231
func (d *MyDecimal) FromInt(val int64) *MyDecimal {
	var uVal uint64
	if val < 0 {
		d.negative = true
		uVal = uint64(-val)
	} else {
		uVal = uint64(val)
	}
	return d.FromUint(uVal)
}
1025648
func ToInt(in interface{}) (int, error) {
	if val, err := cast.ToIntE(in); err == nil {
		return val, nil
	}
	return 0, ErrBadType
}
553722
func getInt(unk interface{}) int64 {
	switch i := unk.(type) {
	case int64:
		return i
	case float64:
		return int64(i)
	case string:
		v, err := strconv.ParseInt(i, 10, 64)
		if err != nil {
			return int64(0)
		}
		return v
	default:
		return int64(0)
	}
}
1140228
func Int(name string, value int, usage string) *int {
	return CommandLine.Int(name, value, usage)
}
431842
func Asin(z, x *decimal.Big) *decimal.Big {
	if z.CheckNaNs(x, nil) {
		return z
	}

	cmp1 := x.CmpAbs(one)
	if x.IsInf(0) || cmp1 > 0 {
		z.Context.Conditions |= decimal.InvalidOperation
		return z.SetNaN(false)
	}

	ctx := decimal.Context{Precision: precision(z)}

	if cmp1 == 0 {
		pi2(z, ctx)
		if x.Signbit() {
			misc.SetSignbit(z, true)
		}
		return z
	}

	ctx.Precision += defaultExtraPrecision

	// Asin(x) = 2 * atan(x / (1 + sqrt(1 - x*x)))

	x2 := ctx.Mul(alias(z, x), x, x)
	ctx.Quo(x2, x, ctx.Add(x2, Sqrt(x2, ctx.Sub(x2, one, x2)), one))
	z.Copy(Atan(decimal.WithContext(ctx), x2))
	ctx.Mul(z, z, two)
	ctx.Precision -= defaultExtraPrecision
	return ctx.Round(z)
}
925474
func (ini *INI) SetInt(key string, value int) {
    ini.SectionSetInt(DefaultSection, key, value)
}
292870
func (e *Event) Int(key string, i int) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendInt(enc.AppendKey(e.buf, key), i)
	return e
}
4534
func (m *MT19937) Int() int {
	u := uint(m.Int32())
	return int(u << 1 >> 1)
}
1307149
func (c *Context) GetInt(key string) (i int) {
	if val, ok := c.Get(key); ok && val != nil {
		i, _ = val.(int)
	}
	return
}