func (d Double) Compare(other ref.Val) ref.Val {
	otherDouble, ok := other.(Double)
	if !ok {
		return MaybeNoSuchOverloadErr(other)
	}
	if d < otherDouble {
		return IntNegOne
	}
	if d > otherDouble {
		return IntOne
	}
	return IntZero
}
Compare implements traits.Comparer.Compare.
package types
import (
	"fmt"
	"reflect"
	"github.com/google/cel-go/common/types/ref"
	"github.com/google/cel-go/common/types/traits"
	anypb "google.golang.org/protobuf/types/known/anypb"
	structpb "google.golang.org/protobuf/types/known/structpb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
type Double float64
var (
	DoubleType = NewTypeValue("double",
		traits.AdderType,
		traits.ComparerType,
		traits.DividerType,
		traits.MultiplierType,
		traits.NegatorType,
		traits.SubtractorType)
	doubleWrapperType = reflect.TypeOf(&wrapperspb.DoubleValue{})
	floatWrapperType = reflect.TypeOf(&wrapperspb.FloatValue{})
)
func (d Double) Add(other ref.Val) ref.Val {
	otherDouble, ok := other.(Double)
	if !ok {
		return MaybeNoSuchOverloadErr(other)
	}
	return d + otherDouble
}