Tanoda
ObjectEquality.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using NUnit.Framework;
10
11namespace Leap.LeapCSharp.Tests {
12 [TestFixture()]
13 public class ObjectEquality {
14 [Test()]
15 public void Vector_ints() {
16 Vector thisVector = new Leap.Vector(1, 2, 3);
17 Vector thatVector = new Leap.Vector(1, 2, 3);
18 Assert.True(thisVector.Equals(thatVector), "this.Equals(that) Vector");
19 //Assert.True (thisVector == thatVector, "this == that Vector");
20
21 }
22 [Test()]
23 public void Vector_floats() {
24 Vector thisVector = new Leap.Vector(1.111111111111111f, 2.222222222222222f, 3.333333333333333f);
25 Vector thatVector = new Leap.Vector(1.111111111111111f, 2.222222222222222f, 3.333333333333333f);
26 Assert.True(thisVector.Equals(thatVector), "this.Equals(that) Vector");
27 //Assert.True (thisVector == thatVector, "this == that Vector");
28
29 }
30 [Test()]
31 public void Vector_more_floats() {
32 Vector thisVector = new Vector(0.199821f, -0.845375f, 0.495392f);
33 Vector thatVector = new Vector(0.199821f, -0.845375f, 0.495392f);
34 Assert.True(thisVector.Equals(thatVector), "this.Equals(that) Vector");
35 //Assert.True (thisVector == thatVector, "this == that Vector");
36 }
37 }
38}
39
The Vector struct represents a three-component mathematical vector or point such as a direction or po...
Definition: Vector.cs:36
bool Equals(Vector v)
Compare Vector equality component-wise.
Definition: Vector.cs:173