cosine law
merge