mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on: [push, pull_request]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_linux:
|
build_linux:
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
GIT_SHA=$(git rev-parse --short HEAD)
|
GIT_SHA=$(git rev-parse --short HEAD)
|
||||||
|
|||||||
@@ -476,21 +476,21 @@ quaternion_angle_axis :: proc{
|
|||||||
|
|
||||||
angle_from_quaternion_f16 :: proc(q: Quaternionf16) -> f16 {
|
angle_from_quaternion_f16 :: proc(q: Quaternionf16) -> f16 {
|
||||||
if abs(q.w) > math.SQRT_THREE*0.5 {
|
if abs(q.w) > math.SQRT_THREE*0.5 {
|
||||||
return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
|
return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
return math.acos(q.w) * 2
|
return math.acos(q.w) * 2
|
||||||
}
|
}
|
||||||
angle_from_quaternion_f32 :: proc(q: Quaternionf32) -> f32 {
|
angle_from_quaternion_f32 :: proc(q: Quaternionf32) -> f32 {
|
||||||
if abs(q.w) > math.SQRT_THREE*0.5 {
|
if abs(q.w) > math.SQRT_THREE*0.5 {
|
||||||
return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
|
return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
return math.acos(q.w) * 2
|
return math.acos(q.w) * 2
|
||||||
}
|
}
|
||||||
angle_from_quaternion_f64 :: proc(q: Quaternionf64) -> f64 {
|
angle_from_quaternion_f64 :: proc(q: Quaternionf64) -> f64 {
|
||||||
if abs(q.w) > math.SQRT_THREE*0.5 {
|
if abs(q.w) > math.SQRT_THREE*0.5 {
|
||||||
return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
|
return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
return math.acos(q.w) * 2
|
return math.acos(q.w) * 2
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ extern "C" {
|
|||||||
#error This operating system is not supported
|
#error This operating system is not supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GB_SYSTEM_OPENBSD)
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define GB_COMPILER_MSVC 1
|
#define GB_COMPILER_MSVC 1
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
|
|||||||
Reference in New Issue
Block a user