rb_tree.h
void rotate_left(node* n)
	{
		// Right child's left child becomes n's right child.
		node* rightChild = n->right;
		n->right = rightChild->left;
		if (n->right != &ms_sentinel)
			n->right->parent = n;

		// n's right child replaces n
		rightChild->parent = n->parent;
		if (n->parent == &ms_sentinel)
		{
			m_root = rightChild;
		}
		else
		{
			if (n == n->parent->left)
				n->parent->left = rightChild;
			else
				n->parent->right = rightChild;
		}
		rightChild->left = n;
		n->parent = rightChild;
	}
// n's right child replaces n and the right child's left child
// becomes n's right child.

n's right child replaces n and the right child's left child
becomes n's right child.
n ' s right child replaces n and the right child ' s left child becomes n ' s right child .
void rotate_left(node* n)
	{
		node* rightChild = n->right;
		n->right = rightChild->left;
		if (n->right != &ms_sentinel)
			n->right->parent = n;
		rightChild->parent = n->parent;
		if (n->parent == &ms_sentinel)
		{
			m_root = rightChild;
		}
		else
		{
			if (n == n->parent->left)
				n->parent->left = rightChild;
			else
				n->parent->right = rightChild;
		}
		rightChild->left = n;
		n->parent = rightChild;
	}
void rotate_left ( node * n ) { node * rightChild = n -> right ; n -> right = rightChild -> left ; if ( n -> right != & ms_sentinel ) n -> right -> parent = n ; rightChild -> parent = n -> parent ; if ( n -> parent == & ms_sentinel ) { m_root = rightChild ; } else { if ( n == n -> parent -> left ) n -> parent -> left = rightChild ; else n -> parent -> right = rightChild ; } rightChild -> left = n ; n -> parent = rightChild ; }
n's right child replaces n and the right child's left child
becomes n's right child.
n ' s right child replaces n and the right child ' s left child becomes n ' s right child .
// Right child's left child becomes n's right child.
 // n's right child replaces n
