Creating lightning bolt effects Which one of these are better for the memory?

protected static List&lt;Line&gt; CreateBolt(Vector2 source, Vector2 dest, float thickness)
{
    //...

    for (int i = 1; i &lt; positions.Count; i++)
    {
        float pos = positions[i];
        float scale = (length * Jaggedness) * (pos - positions[i - 1]);
        float envelope = pos &gt; 0.95f ? 20 * (1 - pos) : 1;
        float displacement = Rand(-Sway, Sway);
        displacement -= (displacement - prevDisplacement) * (1 - scale);

        // ,,,
    }
    //...
}




protected static List&lt;Line&gt; CreateBolt(Vector2 source, Vector2 dest, float thickness)
{
    //...
    float pos;
    float scale;
    float envelope;
    float displacement;     

    for (int i = 1; i &lt; positions.Count; i++)
    {
        pos = positions[i];
        scale = (length * Jaggedness) * (pos - positions[i - 1]);
        envelope = pos &gt; 0.95f ? 20 * (1 - pos) : 1;
        displacement = Rand(-Sway, Sway);
        displacement -= (displacement - prevDisplacement) * (1 - scale);

        // ,,,
    }
    //...
}


Should I declare variables before or inside a for loop? Does it even make a difference at all?
Both of your versions will probably generate the same IL code. See: https://stackoverflow.com/a/7383090/2655508  

The first version is still better, because you should declare variables as near as possible to their usage.  



You shouldn't shorten variable names. You already have positions[] so why do you have pos instead of position?  



You have some magic numbers in your code which should be extracted to some constants with meaningful names.