Fix compatibility with lastest LinearAlgebra

This commit is contained in:
Pascal Serrarens 2025-05-28 12:18:22 +02:00
parent 6254315610
commit 7f3698ecaa

View File

@ -1,3 +1,4 @@
using System;
using LinearAlgebra;
namespace RoboidControl {
@ -50,7 +51,7 @@ namespace RoboidControl {
/// @sa SetLinearVelocity SetAngularVelocity
public void SetDriveDimensions(float wheelDiameter, float wheelSeparation = 0) {
this._wheelRadius = wheelDiameter > 0 ? wheelDiameter / 2 : -wheelDiameter / 2;
this.rpsToMs = wheelDiameter * Angle.pi;
this.rpsToMs = wheelDiameter * (float)Math.PI;
if (wheelSeparation > 0) {
wheelSeparation = wheelSeparation > 0 ? wheelSeparation : -wheelSeparation;