/// <summary> /// Writes a <see cref="PointS"/>. /// </summary> /// <param name="builder">The <see cref="IPacketBuilder">packet builder</see> to use.</param> /// <param name="vector">The <see cref="PointS"/> to write.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="builder"/> is <see langword="null"/>.</exception> /// <inheritdoc cref="PacketBuilder.WriteInt16(short)" select="exception[@cref='ObjectDisposedException']" /> public static void WriteVector(this IPacketBuilder builder, PointS vector) { Guard.NotNull(() => builder, builder); builder.WriteInt16(vector.X); builder.WriteInt16(vector.Y); }