/// <summary>Writes the specified sweep value.</summary> /// <param name="packet">The packet.</param> /// <param name="data">The value to write.</param> /// <returns>This packet, for call chaining.</returns> public static IWritablePacket Write(this IWritablePacket packet, Sweep data) { return(packet .Write(data.LocalCenter) .Write(data.CenterOfMass0) .Write(data.CenterOfMass) .Write(data.Angle0) .Write(data.Angle) .Write(data.Alpha0)); }
/// <summary>Reads a sweep value.</summary> /// <param name="packet">The packet.</param> /// <param name="data">The read value.</param> /// <returns>This packet, for call chaining.</returns> /// <exception cref="PacketException">The packet has not enough available data for the read operation.</exception> public static IReadablePacket Read(this IReadablePacket packet, out Sweep data) { data = packet.ReadSweep(); return(packet); }