dimforge / dimforge/nalgebra

Serialization of 2D rotations uses more data than strictly necessary

Open
#1,123 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Currently, when serializing a 2-D rotation with serde, 2 (`Isometry2` with `UnitComplex` inside) or 4 (`Rotation2`) values are stored, but actually only one is needed (the angle). I think that, at least for `UnitComplex`, it is a waste to store the constant magnitude of 1.

I do not know how practical it would be to implement this special case in the current state of Rust without explicit specialization.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the serde implementations for UnitComplex, Isometry2, and Rotation2, then assess whether an angle-only representation can be added without explicit specialization. Done would require a defined serialization format and coverage showing that the affected 2-D rotations serialize and deserialize correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.