[Mono-dev] Mono.Simd suggestion: Add static members for common values

Rodrigo Kumpera kumpera at gmail.com
Fri Nov 7 09:57:48 EST 2008


Hi John,

Default values are indeed an  useful addition. So far we have focused on API
completeness and not much about
making it easier to use. It's on our plans to add such helpers.

2008/11/6 Hurliman, John <john.hurliman at intel.com>

>  I'm in the process of converting over my OpenMetaverseTypes.dll library
> (basic 3D type library) to use Mono.Simd. One thing that is very handy to
> have is static members for common values, such as:
>
>
>
> public static readonly Vector4f Zero = new Vector4f();
>
> public static readonly Vector4f One = new Vector4f(1f, 1f, 1f, 1f);
>
> public static readonly Vector4f MinusOne = new Vector4f(-1f, -1f, -1f,
> -1f);
>
>
>
> Which makes comparisons much easier:
>
>
>
> if (myvector4f == Vector4f.Zero) { … }
>
>
>
>
>
> -John
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081107/8041bb13/attachment.html 


More information about the Mono-devel-list mailing list