This PR introduces Angle, an helper to deal with radian/degree angles. It replaces the rotate_*_deg methods of the Transform trait, which are removed.
Note: Angle uses radians internally, and radians is the expected unit for all APIs. However, when parsing strings without unit, degrees are expected instead (since it's most commonly used). Likewise, the whiskers widget for Angle defaults to using degrees for display (can be changed using #[param(rad)].
Also:
Improve the Length with support for ctx.rnd_range().
Change many APIs to accept impl Into<f64> for compatibility with Length and Angle.
This PR introduces
Angle
, an helper to deal with radian/degree angles. It replaces therotate_*_deg
methods of theTransform
trait, which are removed.Note:
Angle
uses radians internally, and radians is the expected unit for all APIs. However, when parsing strings without unit, degrees are expected instead (since it's most commonly used). Likewise, the whiskers widget forAngle
defaults to using degrees for display (can be changed using#[param(rad)]
.Also:
Length
with support forctx.rnd_range()
.impl Into<f64>
for compatibility withLength
andAngle
.Length
andUnit
.