In formation control, triangular formations consisting of three autonomous agents serve as a class of benchmarks that can be used to test and compare the performances of different controllers. We present an algorithm that combines the advantages of both position- and distance-based gradient descent control laws. For example, only two pairs of neighboring agents need to be controlled, agents can work in their own local frame of coordinates and the orientation of the formation with respect to a global frame of coordinates is not prescribed. We first present a novel technique based on adding artificial biases to neighboring agents' range sensors such that their eventual positions correspond to a collinear configuration. Right after, a small modification in the bias terms by introducing a prescribed rotation matrix will allow the control of the bearing of the neighboring agents.