public void applyPower(double p) {
        // 1. Find the voltage change after power is applied for 1 tick
        //   Given:
        //     P = dE(t) / dt
        //     P = d(1/2 * C * V(t)^2) / dt
        //
        //   In the above power equation, we want to find dV(t). By moving the values around, we get:
        //     P * 2 * 1/C * dt = dV(t)^2
        //     sqrt(P * 2 * 1/C * dt) = dV(t)
        //
        //   By substituting known values, we can now compute hypothetical voltage drop if the given power
        //   was drawn for 1 tick:
        //     dt = 1/20 = 0.05
        //     1/C = inverseCapacitance
        //     dV(t) = sqrt(P * 2 * inverseCapacitance * 0.05)
        //     dV(t) = sqrt(P * 0.1 * inverseCapacitance)
        //
        // 2. Calculate current required to achieve the voltage drop
        //    Given:
        //      I = C * dV(t) / dt
        //    Current to be drawn to arrive at a dV(t) amount of drop is:
        //      dt = 1/20 = 0.05
        //      C = capacitance
        //      I = capacitance * dV(t) / 0.05
        //      I = capacitance * 20 * dV(t)
        double dVSquared = Math.abs(p) * 0.1D * inverseCapacitance;
        if (p < 0 && dVSquared >= vCap * vCap) {
            // Not enough energy stored to supply the power
            return;
        }

        double dI = 20 * Math.sqrt(dVSquared) * capacitance;
        applyCurrent(p < 0 ? -dI : dI);
    }
Apply continuous power for 1 tick. Negative values will draw power out
@param p Power (W)
core/src/main/java/mrtjp/projectred/core/power/PowerConductor.java