In cases of sales in partition, when it appears that a person has a vested or contingent future right or estate in any of the property sold, the court shall determine the proportional value of the contingent or vested right or estate according to the principles of law applicable to annuities and survivorship, and shall direct that portion of the proceeds of the sale to be invested, secured, or paid over in a manner that will protect the rights and interests of the parties.