Realm

oa::image::rotation_matrix_2d

Build the 2x3 rotation+scale matrix mapping about center, matching getRotationMatrix2D: alpha = scale * cos(angle), beta = scale * sin(angle) with angle in degrees counterclockwise. Errors Returns an error when any parameter is non-finite.

FnRust public API

Function Documentation

pub fn rotation_matrix_2d( center_x: f32, center_y: f32, angle: f32, scale: f32 ) -> Result<Matrix>
Build the 2x3 rotation+scale matrix mapping about center, matching getRotationMatrix2D: alpha = scale * cos(angle), beta = scale * sin(angle) with angle in degrees counterclockwise. Errors Returns an error when any parameter is non-finite.