Vector2dfx extends Tuple2dfx<Vector2dfx> implements Vector2D<Vector2dfx, Point2dfx> { public ReadOnlyDoubleProperty lengthSquaredProperty() { if (this.lengthSquareProperty == null) { this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED); this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() -> Vector2dfx.this.x.doubleValue() * Vector2dfx.this.x.doubleValue() + Vector2dfx.this.y.doubleValue() * Vector2dfx.this.y.doubleValue(), this.x, this.y)); } return this.lengthSquareProperty.getReadOnlyProperty(); } Vector2dfx();  Vector2dfx(DoubleProperty x, DoubleProperty y);  Vector2dfx(Tuple2D<?> tuple);  Vector2dfx(int[] tuple);  Vector2dfx(double[] tuple);  Vector2dfx(int x, int y);  Vector2dfx(float x, float y);  Vector2dfx(double x, double y);  Vector2dfx(long x, long y); static Vector2dfx convert(Tuple2D<?> tuple); @Pure @Inline(value = "new Vector2dfx(Math.cos($1), Math.sin($1))", imported = {Vector2dfx.class}) static Vector2dfx toOrientationVector(double angle); @Override Vector2dfx clone(); @Override double getLength(); ReadOnlyDoubleProperty lengthProperty(); @Override double getLengthSquared(); ReadOnlyDoubleProperty lengthSquaredProperty(); @Override GeomFactory2dfx getGeomFactory(); @Override UnmodifiableVector2D<Vector2dfx, Point2dfx> toUnmodifiable();  }
@Test public void lengthSquaredProperty() { Vector2dfx vector = new Vector2dfx(1, 2); assertEpsilonEquals(5, vector.getLengthSquared()); ReadOnlyDoubleProperty property = vector.lengthSquaredProperty(); assertNotNull(property); assertEpsilonEquals(5, property.get()); vector.set(4, -10); assertEpsilonEquals(116, property.get()); }