   }
 
   func testRotateDegrees() {
-    let v1 = vec2(2, 3);
+    let v1 = vec2(2.0, 3.0);
     let v2 = v1.rotate(degrees: 90)
     XCTAssertEqualWithAccuracy(v2.angleDegrees, v1.angleDegrees + 90.0, accuracy: epsilon)
     let v3 = v1.rotate(degrees: 180)

  }

  func testNormalize() {
    let v1 = vec2(100, 1000)
    let v2 = v1.normalize()
    XCTAssertEqualWithAccuracy(v2.length, 1.0, accuracy: epsilon)
    XCTAssertEqualWithAccuracy(v1.angle, v2.angle, accuracy: epsilon)
  }

  func testNormalizeZero() {
    let v1 = vec2(0, 0)
    let v2 = v1.normalize()
    XCTAssertEqualWithAccuracy(v2.length, 0.0, accuracy: epsilon)
    XCTAssertEqualWithAccuracy(v1.angle, v2.angle, accuracy: epsilon)


  /// Test that rotating by radians works.
  func testRotateRadians() {
    let v = vec2(0.0, 1.0)
    let rot = v.rotate(radians:0.1)
    XCTAssertEqualWithAccuracy(rot.angle, v.angle + 0.1, accuracy: epsilon)

    let v1 = vec2(1.5, 1.0)

    let v2 = v1.rotate(radians: M_PI_2)
    XCTAssertEqualWithAccuracy(v1.y, -v2.x, accuracy: epsilon)
