Change mjsCamera.resolution type from float to int.
Resolution is inherently an integer quantity (pixels). PiperOrigin-RevId: 848276456 Change-Id: I92ee1aa88fd552fd42cb3871442f020f26d6fa6a
This commit is contained in:
committed by
Copybara-Service
parent
9d646e6548
commit
f2e9097ed6
@@ -1278,8 +1278,7 @@ int mjs_sensorDim(const mjsSensor* sensor) {
|
||||
if (sensor->objtype == mjOBJ_CAMERA) {
|
||||
const mjCCamera* camera = static_cast<const mjCCamera*>(
|
||||
static_cast<mjCSensor*>(sensor->element)->get_obj());
|
||||
return static_cast<int>(camera->spec.resolution[0]) *
|
||||
static_cast<int>(camera->spec.resolution[1]);
|
||||
return camera->spec.resolution[0] * camera->spec.resolution[1];
|
||||
}
|
||||
return 1; // site-attached: single ray
|
||||
|
||||
|
||||
Reference in New Issue
Block a user