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

Method __rdiv__

src/main/java/field/linalg/Vec4.java:1550–1569  ·  view source on GitHub ↗
(Object b)

Source from the content-addressed store, hash-verified

1548
1549 }
1550
1551 @Override
1552 public Object __rdiv__(Object b) {
1553 if (b instanceof Number)
1554 return new Vec4( ((Number) b).doubleValue() / this.x , ((Number) b).doubleValue() / this.y, ((Number) b).doubleValue() / this.z, ((Number) b).doubleValue() / this.w);
1555
1556 Vec4 c = convertToVec4(b);
1557 if (c != null)
1558 return new Vec4( c.x / this.x, c.y / this.y, c.z / this.z, c.w / this.w);
1559
1560 if (b instanceof Quat) {
1561 return ((Quat) b).transform(this, new Vec4());
1562 }
1563
1564 if (b instanceof Vec4) {
1565 return this.div((Vec4) b);
1566 }
1567
1568 throw new ClassCastException(" can't divide '" + b + "' by a Vec3 (" + this + ")");
1569
1570 }
1571
1572 @Override

Callers

nothing calls this directly

Calls 3

convertToVec4Method · 0.95
divMethod · 0.95
transformMethod · 0.65

Tested by

no test coverage detected