I read that the torque due to the force exerced by a uniform magnetic field $\mathbf{B}$ on a closed conducting rectangular loop is $$\boldsymbol{\tau}=I\mathbf{S}\times \mathbf{B}$$where $\mathbf{S}$ is a vector whose orientation is determined by the right hand rule applied to the flow of the electric current, whose intensity is $I$, in the wire and whose norm $S$ is the area of the loop.
Then the book says that, by approximating any plane loop with rectangles, we get the same result $\boldsymbol{\tau}=I\mathbf{S}\times \mathbf{B}$ for any plane loop. What does approximating mean in this context, translating it into rigourous mathematical language? I heartily thank any answerer.
I have got an idea, which follows. If $\boldsymbol{\ell}:[a,b]\to\mathbb{R}^3$ is a parametrisation of the loop, I think that the torque with respect to the origin (but it is the same with respect to any point because the resultant force is null) is $$\boldsymbol{\tau}=\int_\gamma \boldsymbol{\ell}\times (I\,d\boldsymbol{\ell}\times\mathbf{B}):=\int_a^b \boldsymbol{\ell}(s)\times \left(I\,\frac{d\boldsymbol{\ell}(s)}{ds}\times\mathbf{B}\right)ds$$ I suspect that the appromixation talked about means that, if $\boldsymbol{\ell}_n:[a,b]\to\mathbb{R}^3$ is a parametrisation of the contour (red in the figure) of the union of rectangular loops (whose interior sides are purple) such that the series $\{\boldsymbol{\ell}_n\}$ uniformly converges to $\boldsymbol{\ell}$, then $$\boldsymbol{\tau}_n:=\int_a^b \boldsymbol{\ell}_n(s)\times \left(I\,\frac{d\boldsymbol{\ell}_n(s)}{ds}\times\mathbf{B}\right)ds\xrightarrow{n\to\infty}\int_a^b\boldsymbol{\ell}(s)\times \left(I\,\frac{d\boldsymbol{\ell}(s)}{ds}\times\mathbf{B}\right)ds$$ Am I right? If I am, how can such convergence be proved?