MCPcopy Index your code
hub / github.com/processing/p5.js / expectCameraMatricesAreClose

Function expectCameraMatricesAreClose

test/unit/webgl/p5.Camera.js:852–857  ·  view source on GitHub ↗
(cam0, cam1)

Source from the content-addressed store, hash-verified

850
851 suite('slerp()', function() {
852 const expectCameraMatricesAreClose = function(cam0, cam1) {
853 for (let i = 0; i < cam0.cameraMatrix.mat4.length; i++) {
854 expect(cam0.cameraMatrix.mat4[i])
855 .to.be.closeTo(cam1.cameraMatrix.mat4[i], 0.001);
856 }
857 };
858 test('if amt is 0 or 1, the argument camera is set', function() {
859 myCam = myp5.createCamera();
860 const cam0 = myCam.copy();

Callers 1

p5.Camera.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected