Eric Martin 3225470df5 Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2
Revert "BAEL-3275: Using blocking queue for pub-sub"
2019-10-31 20:43:47 -05:00

22 lines
597 B
Java

package com.baeldung.maths;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.jupiter.api.Test;
public class MathSinUnitTest {
@Test
public void givenAnAngleInDegrees_whenUsingToRadians_thenResultIsInRadians() {
double angleInDegrees = 30;
double sinForDegrees = Math.sin(Math.toRadians(angleInDegrees)); // 0.5
double thirtyDegreesInRadians = (double) 1 / 6 * Math.PI;
double sinForRadians = Math.sin(thirtyDegreesInRadians); // 0.5
assertThat(sinForDegrees, is(sinForRadians));
}
}