ofCamera orbit angle bug?

Setting the latitude to 90º doesn’t seem to generate the right image (see attachment)?
As you can see top and bottom are offset…What’s going on here?

Simple setup:

#pragma once

#include "ofMain.h"

class ofApp : public ofBaseApp{

		void setup();
		void update();
		void draw();
    ofSpherePrimitive   sphere;
    ofCamera            cam;


void ofApp::setup(){
    sphere.set(250, 16);
    cam.orbit(0, 90, 500);

void ofApp::draw(){

it is sort of a bug.
ofCamera’s orbit method is inherited from ofNode.
In the orbit function there’s the following line

p.rotate(ofClamp(latitude, -89, 89), ofVec3f(1, 0, 0));

The ofClamp function is not allowing the latitude to be 90. This is probably there to avoid a gimbal lock.
if you change that line to

p.rotate(latitude, ofVec3f(1, 0, 0));

you’ll get the desired result, but it could also create a gimbal lock. To avoid this problem the rotation should be performed by a quaternion.
Please post an issue at github.com/openframeworks/openframeworks

Fixing it should be straight forwards. I’ll see if I can do it later.