Skip to content
Snippets Groups Projects
Commit 57fb8b0a authored by codyt's avatar codyt
Browse files

Assignment 2

parent a0134194
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,8 @@ public class TackettMulticastSender { ...@@ -23,8 +23,8 @@ public class TackettMulticastSender {
public static void main(String[] args) public static void main(String[] args)
{ {
int velocity = 2; int velocity = 3;
int dir = 45; int direction = 180;
double xPos = 0; double xPos = 0;
double yPos = 2; double yPos = 2;
...@@ -57,8 +57,8 @@ public class TackettMulticastSender { ...@@ -57,8 +57,8 @@ public class TackettMulticastSender {
for(int idx = 0; idx < 100; idx++) for(int idx = 0; idx < 100; idx++)
{ {
xPos = xPos + (Math.cos(Math.toRadians(dir))*velocity); //computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment xPos = xPos + (Math.cos(Math.toRadians(direction))*velocity); //computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment
yPos = yPos + (Math.sin(Math.toRadians(dir))*velocity); //computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment yPos = yPos + (Math.sin(Math.toRadians(direction))*velocity); //computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos); DataOutputStream dos = new DataOutputStream(baos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment