Transform: Fixed bug in euler to quaternion conversions | Static_Array: Added overload for operator []= | Widgets: Added changed bool to textfields

This commit is contained in:
2024-12-11 23:28:14 +01:00
parent c4073d7d91
commit 36c6bc5fe7
6 changed files with 36 additions and 15 deletions

View File

@@ -30,4 +30,8 @@ array_contains :: (static_array: Static_Array, value: static_array.Data_Type) ->
operator [] :: (static_array: Static_Array, index: int) -> static_array.Data_Type {
return static_array.data[index];
}
}
operator []= :: (static_array: *Static_Array, index: int, value: static_array.Data_Type) {
static_array.data[index] = value;
}

View File

@@ -130,7 +130,7 @@ quaternion_to_euler :: (q: Quaternion) -> yaw: float, pitch: float, roll: float
cosy_cosp := 1.0 - 2.0 * (q.y * q.y + q.z * q.z);
yaw = atan2(siny_cosp, cosy_cosp);
return pitch, yaw, roll;
return yaw, pitch, roll;
}
set_rotation :: (e: *Entity, orientation: Quaternion, calculate_matrix: bool = true) {