MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / __rdiv__

Method __rdiv__

src/main/java/field/graphics/FLine.java:2281–2307  ·  view source on GitHub ↗
(Object b)

Source from the content-addressed store, hash-verified

2279 } else if (b instanceof Vec2) {
2280 Vec3 finalB = ((Vec2) b).toVec3();
2281 return byTransforming(x -> new Vec3(finalB).div(x));
2282 } else if (b instanceof Vec3) {
2283 Vec3 finalB = (Vec3) b;
2284 return byTransforming(x -> new Vec3(finalB).div(x));
2285 } else if (b instanceof Quat) {
2286 Quat finalB = (Quat) b;
2287 return byTransforming(x -> finalB.transform(x, new Vec3()));
2288 } else if (b instanceof FLine) {
2289 Shape s1 = FLinesAndJavaShapes.flineToJavaShape(this);
2290 Shape s2 = FLinesAndJavaShapes.flineToJavaShape((FLine) b);
2291
2292 Area a1 = new Area(s1);
2293 Area a2 = new Area(s2);
2294 a1.intersect(a2);
2295 FLine ret = FLinesAndJavaShapes.javaShapeToFLine(a1);
2296 ret.attributes = this.attributes.duplicate(ret);
2297 return ret;
2298 }
2299 throw new ClassCastException(" can't multiply '" + b + "' to this FLine");
2300 }
2301
2302 private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
2303 nodes = new ArrayList<>();
2304 attributes = new Dict();
2305 cache = new WeakHashMap<>();
2306 cache_thickening = new WeakHashMap<>();
2307
2308 new FLineSerializationHelper().readObject(this, in);
2309 }
2310

Callers

nothing calls this directly

Calls 8

byTransformingMethod · 0.95
transformMethod · 0.95
flineToJavaShapeMethod · 0.95
javaShapeToFLineMethod · 0.95
duplicateMethod · 0.65
toVec3Method · 0.45
divMethod · 0.45
intersectMethod · 0.45

Tested by

no test coverage detected