public double division(PointTest point) { double x = Double.Parse(point.x.ToString()); double y = Double.Parse(point.y.ToString()); return(x / y); }
static void Main() { PointTest p = new PointTest(); // Direct access to public members: p.x = 10; p.y = 15; Console.WriteLine("x = {0}, y = {1}", p.x, p.y); }
static void Main() { var p = new PointTest(); // Direct access to public members. p.x = 10; p.y = 15; Console.WriteLine($"x = {p.x}, y = {p.y}"); }
public void MultiplicacaoAtualizadaSucesso(int x, int y, int z) { var point = new PointTest(30, 20); var operation = new Operation(); var resultado = operation.multiplication(point); Assert.True((point.x * point.y) == resultado); }
public void SubtracaoSucesso() { var point = new PointTest(30, 20); var operation = new Operation(); var resultado = operation.subtraction(point); Assert.True((point.x - point.y) == resultado); }
public void SomaSucesso() { var point = new PointTest(10, 20); var operation = new Operation(); var resultado = operation.sum(point); Assert.True((point.x + point.y) == resultado); }
static void Main() { PointTest p = new PointTest(); // Direct access to public members: p.x = 10; p.y = 15; Console.WriteLine("x = {0}, y = {1}", p.x, p.y); }
public void DivisaoSucesso() { var point = new PointTest(25, 25); var operation = new Operation(); var resultado = operation.division(point); double x = Double.Parse(point.x.ToString()); double y = Double.Parse(point.y.ToString()); Assert.True((x / y) == resultado); }
void OnCollisionEnter(Collision other) { if (!hit) { Debug.Log("Collision Detected"); if (GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().landmark != null) { if (this.transform.parent.gameObject.name == GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>().testObject.name) { GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().Right_Answer.Play(); Debug.Log("You have reached the right destination!"); test = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>(); test.testObject = null; test.resetTime(); return; } else { GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().Wrong_Answer.Play(); Debug.Log("You have reached the wrong destination!"); test = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>(); test.testObject = null; test.resetTime(); return; } } else { PointTest pt = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>(); pt.testObject = null; pt.findText.text = ""; jingle.Play(); gameObject.GetComponent <Renderer>().material.color = Color.cyan; foreach (Renderer r in GetComponentsInChildren <Renderer>()) { r.material.color = Color.cyan; } recolorPeriod = recolorTime; hit = true; return; } } }
public int sum(PointTest point) { return(point.x + point.y); }
public int subtraction(PointTest point) { return(point.x - point.y); }
public int multiplication(PointTest point) { return(point.x * point.y); }