static Offset <FDouble> Serialise(FlatBufferBuilder b, IHasDouble numeral) { FDouble.StartFDouble(b); var vec2 = numeral.ObservationValue; var granularity = numeral.DoubleSpace.DecimalGranularity; var xs = numeral.DoubleSpace.Xspace; var ys = numeral.DoubleSpace.Yspace; FDouble.AddXRange(b, FRange.CreateFRange(b, granularity, xs.Max, xs.Min, xs.NormalisedBool)); FDouble.AddYRange(b, FRange.CreateFRange(b, granularity, ys.Max, ys.Min, ys.NormalisedBool)); FDouble.AddVec2(b, FVector2.CreateFVector2(b, vec2.x, vec2.y)); return(FDouble.EndFDouble(b)); }
static Offset <FDouble> build_double(FlatBufferBuilder b, IHasDouble numeral) { FDouble.StartFDouble(b); var vec2 = numeral.ObservationValue; FDouble.AddVec2(b, FVector2.CreateFVector2(b, vec2.x, vec2.y)); //FSingle.AddRange(b, numeral.ObservationValue); return(FDouble.EndFDouble(b)); }