(Object b)
| 1851 | } else if (b instanceof Vec3) { |
| 1852 | Vec3 finalB = (Vec3) b; |
| 1853 | return byTransforming(x -> new Vec3(x).sub(finalB)); |
| 1854 | } else if (b instanceof Quat) { |
| 1855 | Quat finalB = (Quat) b; |
| 1856 | return byTransforming(x -> finalB.invert(new Quat()).transform(x, new Vec3())); |
| 1857 | } else if (b instanceof FLine) { |
| 1858 | Shape s1 = FLinesAndJavaShapes.flineToJavaShape(this); |
| 1859 | Shape s2 = FLinesAndJavaShapes.flineToJavaShape((FLine) b); |
| 1860 | |
| 1861 | Area a1 = new Area(s1); |
| 1862 | Area a2 = new Area(s2); |
| 1863 | a1.subtract(a2); |
| 1864 | FLine ret = FLinesAndJavaShapes.javaShapeToFLine(a1); |
| 1865 | ret.attributes = this.attributes.duplicate(ret); |
| 1866 | return ret; |
| 1867 | } else if (b instanceof ScriptObjectMirror && ((ScriptObjectMirror) b).isArray()) { |
| 1868 | List b2 = ((ScriptObjectMirror) b).to(List.class); |
| 1869 | |
| 1870 | if (b2 instanceof List && (((List) b2).size() > 0)) { |
| 1871 | |
| 1872 | Object oo = ((List) b2).get(0); |
| 1873 | if (oo instanceof Vec3) { |
| 1874 | return new FLine().append((List<FLine>) ((List) b2).stream().map(x -> this.__sub__(x)).collect(Collectors.toList())).copyAttributesFrom(this); |
| 1875 | } else if (oo instanceof Vec2) { |
| 1876 | return new FLine().append((List<FLine>) ((List) b2).stream().map(x -> this.__sub__(x)).collect(Collectors.toList())).copyAttributesFrom(this); |
| 1877 | } else if (oo instanceof OverloadedMath) { |
| 1878 | List m = (List) ((List) b2).stream().map(x -> this.__add__(x)).collect(Collectors.toList()); |
| 1879 | if (m.size() > 0) { |
| 1880 | if (m.get(0) instanceof FLine) { |
| 1881 | return new FLine().append((List<FLine>) m); |
| 1882 | } |
| 1883 | } |
| 1884 | return m; |
| 1885 | } |
| 1886 | } |
| 1887 | } else if (b instanceof List && (((List) b).size() > 0)) { |
| 1888 | |
| 1889 | Object oo = ((List) b).get(0); |
| 1890 | if (oo instanceof Vec3) { |
| 1891 | return new FLine().append((List<FLine>) ((List) b).stream().map(x -> this.__sub__(x)).collect(Collectors.toList())).copyAttributesFrom(this); |
| 1892 | } else if (oo instanceof Vec2) { |
| 1893 | return new FLine().append((List<FLine>) ((List) b).stream().map(x -> this.__sub__(x)).collect(Collectors.toList())).copyAttributesFrom(this); |
| 1894 | } else if (oo instanceof OverloadedMath) { |
| 1895 | List m = (List) ((List) b).stream().map(x -> this.__sub__(x)).collect(Collectors.toList()); |
| 1896 | if (m.size() > 0) { |
| 1897 | if (m.get(0) instanceof FLine) { |
| 1898 | return new FLine().append((List<FLine>) m); |
| 1899 | } |
| 1900 | } |
| 1901 | return m; |
| 1902 | } |
| 1903 | |
| 1904 | |
| 1905 | } else if (b instanceof OverloadedMath) return ((OverloadedMath) b).__rsub__(this); |
| 1906 | throw new ClassCastException(" can't subtract '" + b + "' from this FLine"); |
| 1907 | } |
| 1908 | |
| 1909 | @HiddenInAutocomplete |
| 1910 | private FLine copyAttributesFrom(FLine fLine) { |
nothing calls this directly
no test coverage detected