Memory-swap limits incoherence

According to the docker documentation if --memory-swap is unset, and --memory is set, the container can use twice as much swap as the --memory setting, if the host container has swap memory configured. if --memory="300m" and --memory-swap is not set, the container can use 300m of memory and 600m of swap.
But according to another docker documentation if --memory-swap is unset, the total virtual memory size (–memory-swap) will be set as double of memory.
Witch one is correct?