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:
Yuval Tassa
2025-12-23 13:13:38 -08:00
committed by Copybara-Service
parent 9d646e6548
commit f2e9097ed6
5 changed files with 17 additions and 18 deletions
+3 -3
View File
@@ -3135,6 +3135,9 @@ struct MjsCamera {
void set_proj(mjtProjection value) {
ptr_->proj = value;
}
emscripten::val resolution() const {
return emscripten::val(emscripten::typed_memory_view(2, ptr_->resolution));
}
double fovy() const {
return ptr_->fovy;
}
@@ -3153,9 +3156,6 @@ struct MjsCamera {
emscripten::val sensor_size() const {
return emscripten::val(emscripten::typed_memory_view(2, ptr_->sensor_size));
}
emscripten::val resolution() const {
return emscripten::val(emscripten::typed_memory_view(2, ptr_->resolution));
}
emscripten::val focal_length() const {
return emscripten::val(emscripten::typed_memory_view(2, ptr_->focal_length));
}