[Mono-list] Byte.CompareTo etc

Gaurav Vaish gvaish@iitk.ac.in
Sun, 13 Jan 2002 01:05:36 +0530


----- Original Message -----
From: "James Ots" <me@jamesots.com>
To: <mono-list@ximian.com>
Sent: Sunday, January 13, 2002 00:30
Subject: [Mono-list] Byte.CompareTo etc


: rather than:
:
: ----
: return (value - ((byte) v))


    You are supposed to send 0, +1 or -1, not the actual difference. Another way
would be sgn(value - (byte)v) -

    Hey Miguel, is sgn(...) defined in any class? Can is shorten the code?



Cheers,
Gaurav Vaish
----------------------------

: ----
:
: By the way, I'm completely new to mono, so I'm expecting there to be a
: good reason and that I'm making rash assumptions here :-)
:
: --
: Cheers
: James Ots
:
:
:
:
: _______________________________________________
: Mono-list maillist  -  Mono-list@ximian.com
: http://lists.ximian.com/mailman/listinfo/mono-list