From b638056bcd7c2af1c864257766d47a06f51d41d3 Mon Sep 17 00:00:00 2001 From: Zak Strange Date: Thu, 25 Aug 2016 16:11:03 -0700 Subject: [PATCH] Updated README.md and Fixed SSE code --- HandmadeMath.h | 14 ++++++++------ README.md | 14 +++++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/HandmadeMath.h b/HandmadeMath.h index 33ed44e..efef2be 100644 --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -1,5 +1,5 @@ /* - HandmadeMath.h v0.5.1 + HandmadeMath.h v0.5.2 This is a single header file with a bunch of useful functions for basic game math operations. @@ -119,7 +119,9 @@ 0.5.1 (*) Ensured column-major order for matrices throughout (*) Fixed HMM_Translate producing row-major matrices - + 0.5.2 + (*) Fixed SSE code in HMM_SqrtF + (*) Fixed SSE code in HMM_RSqrtF LICENSE @@ -533,9 +535,9 @@ HMM_SqrtF(float Value) #ifdef HANDMADE_MATH_NO_SSE Result = sqrtf(Value); #else - __m128 In = _mm_load_ss(&Value); + __m128 In = _mm_set_ss(Value); __m128 Out = _mm_sqrt_ss(In); - _mm_store_ss(&Result, Out); + Result = _mm_cvtss_f32(Out); #endif return(Result); @@ -549,9 +551,9 @@ HMM_RSqrtF(float Value) #ifdef HANDMADE_MATH_NO_SSE Result = 1.0f/HMM_SqrtF(Value); #else - __m128 In = _mm_load_ss(&Value); + __m128 In = _mm_set_ss(Value); __m128 Out = _mm_rsqrt_ss(In); - _mm_store_ss(&Result, Out); + Result = _mm_cvtss_f32(Out); #endif return(Result); diff --git a/README.md b/README.md index d9dd98e..a1da414 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,28 @@ # Handmade-Math ------ -Single-file public domain game math library for C/C++ + +Single-file cross-platform public domain game math library for C/C++ Version | Changes | ----------------|----------------| +**0.5.2** | Fixed SSE code in HMM_SqrtF and HMM_RSqrtF | **0.5.1** | Fixed HMM_Translate producing row-major matrices, ensured column-major order for matrices throughout | **0.5** | Added scalar operations on vectors and matrices, added += and -= for hmm_mat4, reconciled headers and implementations, tidied up in general | -**0.4** | Added SSE Optimized HMM_SqrtF, HMM_RSqrtF, Removed use of CRT | +**0.4** | Added SSE Optimized HMM_SqrtF, HMM_RSqrtF, Removed use of C Runtime | **0.3** | Added +=,-=, *=, /= for hmm_vec2, hmm_vec3, hmm_vec4 | **0.2b** | Disabled warning C4201 on MSVC, Added 64bit percision on HMM_PI | **0.2a** | Prefixed Macros | **0.2** | Updated Documentation, Fixed C Compliance, Prefixed all functions, and added better operator overloading | **0.1** | Initial Version | -_ID: In Development_ +----- +_This library is free and will stay free, but if you would like to support development, or you are a company using HandmadeMath, please consider financial support._ + +![alt text](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png "Logo Title Text 1") + + + ## FAQ