- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
@Test public void testSingularitiesYawPitchRoll() throws Exception { Quaternion quaternion = new Quaternion(); quaternion.setYawPitchRoll(0.5 * Math.PI, 0.0, 1e-9 - 0.5 * Math.PI); double[] yawPitchRoll = new double[3]; quaternion.getYawPitchRoll(yawPitchRoll); } }
@ContinuousIntegrationTest(estimatedDuration = 0.0) @Test(timeout = 30000) public void testQuaternionStuff() { Quaternion q = new Quaternion(); int nTests = 100; for (int i = 0; i < nTests; i++) { double pi = Math.PI; double yaw = (random.nextDouble() - 0.5) * 2.0 * pi; double pitch = (random.nextDouble() - 0.5) * 0.5 * pi; double roll = (random.nextDouble() - 0.5) * 2.0 * pi; double[] yawPitchRoll = {yaw, pitch, roll}; q.setYawPitchRoll(yaw, pitch, roll); double[] yawPitchRollBack = new double[3]; q.getYawPitchRoll(yawPitchRollBack); double epsilon = 1e-8; localAssertArrayEquals(yawPitchRoll, yawPitchRollBack, epsilon); } }