// PreciseVectorFromVector creates a high precision vector from the given Vector.
971306
func PreciseVectorFromVector(v Vector) PreciseVector {
	return NewPreciseVector(v.X, v.Y, v.Z)
}
77364
func precomputeDistances(ls orb.LineString, df orb.DistanceFunc) (float64, []float64) {
	total := 0.0
	dists := make([]float64, len(ls)-1)
	for i := 0; i < len(ls)-1; i++ {
		dists[i] = df(ls[i], ls[i+1])
		total += dists[i]
	}

	return total, dists
}
607901
func Mat4FromRows(row0, row1, row2, row3 Vec4) Mat4 {
	return Mat4{row0[0], row1[0], row2[0], row3[0], row0[1], row1[1], row2[1], row3[1], row0[2], row1[2], row2[2], row3[2], row0[3], row1[3], row2[3], row3[3]}
}
254603
func init() {
	for i := range precomputedFactor {
		precomputedFactor[i] = math.Exp(-1.0 * float64(i) * lambda)
	}
}
255682
func Mat3FromRows(row0, row1, row2 Vec3) Mat3 {
	return Mat3{row0[0], row1[0], row2[0], row0[1], row1[1], row2[1], row0[2], row1[2], row2[2]}
}
95431
func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length uint32, extra uintptr) (*SafeArray, error) {
	return nil, NewError(E_NOTIMPL)
}
263533
func (s *HlsContentProtection) SetInitializationVector(v string) *HlsContentProtection {
	s.InitializationVector = &v
	return s
}
1224503
func ScaleVector(v *Vector, s float64) *Vector {
	return NewVector(v.x*s, v.y*s)
}
859196
func (v PreciseVector) Equal(ov PreciseVector) bool {
	return v.X.Cmp(ov.X) == 0 && v.Y.Cmp(ov.Y) == 0 && v.Z.Cmp(ov.Z) == 0
}
720237
func precision(val float64, pre int) float64 {
	div := math.Pow10(pre)
	return float64(int64(val*div)) / div
}
1131360
func (v Vec2) Vec3(z float32) Vec3 {
	return Vec3{v[0], v[1], z}
}
642371
func (mat *T) TransformVec3(v *vec3.T) {
	// Use intermediate variables to not alter further computations.
	x := mat[0][0]*v[0] + mat[1][0]*v[1] + mat[2][0]*v[2]
	y := mat[0][1]*v[0] + mat[1][1]*v[1] + mat[2][1]*v[2]
	v[2] = mat[0][2]*v[0] + mat[1][2]*v[1] + mat[2][2]*v[2]
	v[0] = x
	v[1] = y
}
982133
func (p *WebPage) SetZoomFactor(factor float64) error {
	return p.ref.process.doJSON("POST", "/webpage/SetZoomFactor", map[string]interface{}{"ref": p.ref.id, "value": factor}, nil)
}
427164
func GetPrecisionMultiplier(precision string) int64 {
	d := time.Nanosecond
	switch precision {
	case "us":
		d = time.Microsecond
	case "ms":
		d = time.Millisecond
	case "s":
		d = time.Second
	}
	return int64(d)
}
800574
func safeArrayCreateVector(variantType VT, lowerBound int32, length uint32) (safearray *SafeArray, err error) {
	sa, _, err := procSafeArrayCreateVector.Call(
		uintptr(variantType),
		uintptr(lowerBound),
		uintptr(length))
	safearray = (*SafeArray)(unsafe.Pointer(sa))
	return
}
1130813
func (p *Point) MultiplyMatrixVector(m *Matrix) *Point {
	x := m.Val[m00]*p.X + m.Val[m01]*p.Y + m.Val[m02]
	y := m.Val[m10]*p.X + m.Val[m11]*p.Y + m.Val[m12]
	p.X, p.Y = x, y
	return p
}
1350493
func (db *DB) NewUint64Vector(name string) (f Uint64Vector, err error) {
	key, err := db.schemaFieldKey(name, "vector-uint64")
	if err != nil {
		return f, err
	}
	return Uint64Vector{
		db:  db,
		key: key,
	}, nil
}