def testNamedElementWriteAccessY(self): vector = gm.Vec2f() vector.y = 1 self.assertEqual(vector[1], 1)
def testDefaultInitialization(self): vector = gm.Vec2f() self.assertEqual(vector, gm.Vec2f(0.0, 0.0))
def testNamedElementWriteAccessX(self): vector = gm.Vec2f() vector.x = 0 self.assertEqual(vector[0], 0)
def testNamedElementReadAccessY(self): vector = gm.Vec2f(0.0, 1.0) self.assertEqual(vector.y, 1)
def testElementWriteAccess(self): vector = gm.Vec2f() vector[0] = 0.0 vector[1] = 2.0 self.assertAlmostEqual(vector[0], 0.0) self.assertAlmostEqual(vector[1], 2.0)
def testElementReadAccess(self): vector = gm.Vec2f(0.0, 2.0) self.assertAlmostEqual(vector[0], 0.0) self.assertAlmostEqual(vector[1], 2.0)
def testElementInitialization(self): gm.Vec2f(0.0, 2.0)
def testVec2f(self): vectorA = gm.Vec2f(0.0, 1.0); vectorB = gm.Vec2f(0.0, 5.0); self.assertEqual(gm.DotProduct(vectorA, vectorB), 5.0);
def testMinMaxInitialization(self): gm.Vec2fRange( gm.Vec2f(), gm.Vec2f(), )