| 1851 | |
| 1852 | } |
| 1853 | @Override |
| 1854 | public Object __div__(Object b) { |
| 1855 | if (b instanceof Number) |
| 1856 | return new Vec3(this).mul(1.0/((Number) b).doubleValue()); |
| 1857 | |
| 1858 | Vec3 c = convertToVec3(b); |
| 1859 | if (c != null) |
| 1860 | return new Vec3(this.x / c.x, this.y / c.y, this.z / c.z); |
| 1861 | |
| 1862 | if (b instanceof Quat) { |
| 1863 | return ((Quat) b).transform(this, new Vec3()); |
| 1864 | } |
| 1865 | |
| 1866 | if (b instanceof Vec4) { |
| 1867 | return ((Vec4)b).div(this.toVec4()); |
| 1868 | } |
| 1869 | |
| 1870 | if (b instanceof OverloadedMath) |
| 1871 | return ((OverloadedMath) b).__rdiv__(this); |
| 1872 | |
| 1873 | throw new ClassCastException(" can't divide'" + b + "' and a Vec3 (" + this + ")"); |
| 1874 | } |
| 1875 | |
| 1876 | @Override |
| 1877 | public Object __rdiv__(Object b) { |