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

Method convertToVec4

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

Source from the content-addressed store, hash-verified

1580 }
1581
1582
1583 private Vec4 convertToVec4(Object b) {
1584 if (b instanceof Vec4) return (Vec4) b;
1585 if (b instanceof Vec3) return ((Vec3) b).toVec4();
1586 if (b instanceof Vec2) return ((Vec2) b).toVec4();
1587 if (b instanceof Number)
1588 return new Vec4(((Number) b).doubleValue(), ((Number) b).doubleValue(), ((Number) b).doubleValue(), 1);
1589 return null;
1590 }
1591
1592 /**

Callers 8

__rsub__Method · 0.95
__sub__Method · 0.95
__add__Method · 0.95
__radd__Method · 0.95
__mul__Method · 0.95
__div__Method · 0.95
__rmul__Method · 0.95
__rdiv__Method · 0.95

Calls 1

toVec4Method · 0.45

Tested by

no test coverage detected