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

Method convertToVec3

src/main/java/field/linalg/Vec3.java:1908–1915  ·  view source on GitHub ↗
(Object b)

Source from the content-addressed store, hash-verified

1906 }
1907
1908 private Vec3 convertToVec3(Object b) {
1909 if (b instanceof Vec3) return (Vec3) b;
1910 if (b instanceof Vec2) return ((Vec2) b).toVec3();
1911 if (b instanceof Number)
1912 return new Vec3(((Number) b).doubleValue(), ((Number) b).doubleValue(), ((Number) b).doubleValue());
1913 // Vec4 — ??
1914 return null;
1915 }
1916
1917
1918}

Callers 8

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

Calls 1

toVec3Method · 0.45

Tested by

no test coverage detected